Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

can I run the script without GPU&apex? #29

Closed
Dee-Why opened this issue Dec 12, 2021 · 1 comment
Closed

can I run the script without GPU&apex? #29

Dee-Why opened this issue Dec 12, 2021 · 1 comment

Comments

@Dee-Why
Copy link

Dee-Why commented Dec 12, 2021

I'm on my ubuntu server(without GPU), trying to run your script.
pip install -r requirements.txt is successful (i ignored the apex requirement, don't have gpu now)
but when I runned the following command, I meet the following issue
and all other .yaml throwed me the same issue.

~/code/pytorch_image_classification# python train.py --config configs/cifar/resnet.yaml
Traceback (most recent call last):
File "train.py", line 449, in
main()
File "train.py", line 353, in main
save_config(get_env_info(config), output_dir / 'env.yaml')
File "/root/code/pytorch_image_classification/pytorch_image_classification/utils/env_info.py", line 19, in get_env_info
return ConfigNode({'env_info': info})
File "/root/code/pytorch_image_classification/pytorch_image_classification/config/config_node.py", line 6, in init
super().init(init_dict, key_list, new_allowed)
File "/root/archiconda3/envs/python38/lib/python3.8/site-packages/yacs/config.py", line 86, in init
init_dict = self._create_config_tree_from_dict(init_dict, key_list)
File "/root/archiconda3/envs/python38/lib/python3.8/site-packages/yacs/config.py", line 126, in _create_config_tree_from_dict
dic[k] = cls(v, key_list=key_list + [k])
File "/root/code/pytorch_image_classification/pytorch_image_classification/config/config_node.py", line 6, in init
super().init(init_dict, key_list, new_allowed)
File "/root/archiconda3/envs/python38/lib/python3.8/site-packages/yacs/config.py", line 86, in init
init_dict = self._create_config_tree_from_dict(init_dict, key_list)
File "/root/archiconda3/envs/python38/lib/python3.8/site-packages/yacs/config.py", line 129, in _create_config_tree_from_dict
_assert_with_logging(
File "/root/archiconda3/envs/python38/lib/python3.8/site-packages/yacs/config.py", line 545, in _assert_with_logging
assert cond, msg
AssertionError: Key env_info.pytorch_version with value <class 'torch.torch_version.TorchVersion'> is not a valid type; valid types: {<class 'NoneType'>, <class 'list'>, <class 'bool'>, <class 'int'>, <class 'tuple'>, <class 'float'>, <class 'str'>}

@hysts hysts closed this as completed in 993089a Dec 12, 2021
@hysts
Copy link
Owner

hysts commented Dec 12, 2021

Hi, @Dee-Why

Thank you for reporting this. I fixed it.

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

No branches or pull requests

2 participants