-
Notifications
You must be signed in to change notification settings - Fork 216
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
[BUG] wrong import of tools/train_net.py #216
Comments
We will check this later~ |
I have the same |
I tried installation on two machines. On the first one, it works well. On the second machine, when I run File "/mnt/lustre/zhulei1/GitRepo/detrex-custom/detectron2/tools/train_net.py", line 125, in main
cfg = setup(args)
File "/mnt/lustre/zhulei1/GitRepo/detrex-custom/detectron2/tools/train_net.py", line 117, in setup
cfg.merge_from_file(args.config_file)
File "/mnt/lustre/zhulei1/GitRepo/detrex-custom/detectron2/detectron2/config/config.py", line 46, in merge_from_file
loaded_cfg = self.load_yaml_with_base(cfg_filename, allow_unsafe=allow_unsafe)
File "/mnt/lustre/zhulei1/miniconda3/envs/detrex/lib/python3.7/site-packages/fvcore/common/config.py", line 61, in load_yaml_with_base
cfg = yaml.safe_load(f)
File "/mnt/lustre/zhulei1/miniconda3/envs/detrex/lib/python3.7/site-packages/yaml/__init__.py", line 125, in safe_load
return load(stream, SafeLoader)
File "/mnt/lustre/zhulei1/miniconda3/envs/detrex/lib/python3.7/site-packages/yaml/__init__.py", line 81, in load
return loader.get_single_data()
File "/mnt/lustre/zhulei1/miniconda3/envs/detrex/lib/python3.7/site-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "/mnt/lustre/zhulei1/miniconda3/envs/detrex/lib/python3.7/site-packages/yaml/composer.py", line 39, in get_single_node
if not self.check_event(StreamEndEvent):
File "/mnt/lustre/zhulei1/miniconda3/envs/detrex/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/mnt/lustre/zhulei1/miniconda3/envs/detrex/lib/python3.7/site-packages/yaml/parser.py", line 174, in parse_document_start
self.peek_token().start_mark)
yaml.parser.ParserError: expected '<document start>', but found '<scalar>' Obviously, python found the wrong file |
I am wondering how did you install detectron2 and detrex~ Maybe you can follow the official installation guide to see if this problem can be solved~ |
I remember that I followed the official installation guide to install detrex exactly. I think you can ignore my problem at this time. Those users who meet the same problem can find this issue and workarounds. |
Sometimes, python interpreter can find the wrong train_net.py (i.e. detrex/detectron2/tools/train_net.py). It is due to in PYTHONPATH, detrex/detection2/ is in front of detrex/.
Possible workarounds are:
See if you have more elegant solutions.
The text was updated successfully, but these errors were encountered: