Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when doing step 1) Training MagicPoint on Synthetic Shapes #259

Closed
alexjin98 opened this issue Jun 9, 2022 · 6 comments
Closed

Comments

@alexjin98
Copy link

alexjin98 commented Jun 9, 2022

Hi! I'm having this problem when trying to train the MagicPoint on Susthetic Shapes. I'm a beginner at this so sorry if this is a dumb question. Thank you.

Here is the terminal command and respective output:

(mlp) alexandre@Alexandres-MacBook-Air superpoint % python experiment.py train configs/magic-point_shapes.yaml magic-point_synth
Traceback (most recent call last):
File "experiment.py", line 153, in
config = yaml.load(f)
TypeError: load() missing 1 required positional argument: 'Loader'

@rpautrat
Copy link
Owner

rpautrat commented Jun 9, 2022

Hi, what are your Python and pyyaml versions? Maybe try to upgrade them to the latest version.

@alexjin98
Copy link
Author

Hi. I have python 3.8 and pyyaml 6.0

Another thing, I cannot seem to download the COCO dataset from its website. Do not know if the issue has anything related to that.

@rpautrat
Copy link
Owner

I think the fix is actually to downgrade your pyyaml version (e.g. to version 5), as suggested here.

@alexjin98
Copy link
Author

Thank you. It solved the problem.

I now face another issue. Since I'm running on a macOS, I cannot run with the CUDA driver, as seen below.

Is there a solution for users using macOS running on an M1?

(mlp) alexandre@Alexandres-MacBook-Air superpoint % python experiment.py train configs/magic-point_shapes.yaml magic-point_synth
experiment.py:153: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(f)
[06/10/2022 11:24:56 INFO] Running command TRAIN
Traceback (most recent call last):
File "experiment.py", line 160, in
args.func(config, output_dir, args)
File "experiment.py", line 97, in _cli_train
train(config, config['train_iter'], output_dir, pretrained_dir)
File "experiment.py", line 22, in train
with _init_graph(config) as net:
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlp/lib/python3.8/contextlib.py", line 113, in enter
return next(self.gen)
File "experiment.py", line 68, in _init_graph
n_gpus = get_num_gpus()
File "experiment.py", line 62, in get_num_gpus
return len(os.environ['CUDA_VISIBLE_DEVICES'].split(','))
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlp/lib/python3.8/os.py", line 675, in getitem
raise KeyError(key) from None
KeyError: 'CUDA_VISIBLE_DEVICES'

@rpautrat
Copy link
Owner

Unfortunately, this code can only be run on GPU for now. I guess it could be made compatible with CPU by changing all the parts of the code using GPU into CPU, and removing the search for CUDA_VISIBLE_DEVICES, but this might require a bit of work...

@alexjin98
Copy link
Author

Ok. Thank you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants