fredfung007 / snlt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some problems about building the process for training

KennithLi opened this issue · comments

Thanks for your contribution. Could you provide the detailed environment config, data preparing, and training process? It is a little hard to follow the steps to train or test the codes. Some errors arise when I want to train the model:
python run_experiment.py --num_machines=1 --config_file=configs.py

Traceback (most recent call last):
  File "run_experiment.py", line 94, in <module>
    cfg.merge_from_file(FLAGS.config_file)
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 212, in merge_from_file
    cfg = self.load_cfg(f)
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 363, in load_cfg
    return cls._load_cfg_from_file(cfg_file_obj_or_str)
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 374, in _load_cfg_from_file
    return cls._load_cfg_py_source(file_obj.name)
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 393, in _load_cfg_py_source
    "Python module from file {} must have 'cfg' attr".format(filename),
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 545, in _assert_with_logging
    assert cond, msg
AssertionError: Python module from file configs.py must have 'cfg' attr

The --config_file flag should be a relative path to one of the yaml files that are under the experiments/ folder.

Thanks for your contribution. Could you provide the detailed environment config, data preparing, and training process? It is a little hard to follow the steps to train or test the codes. Some errors arise when I want to train the model: python run_experiment.py --num_machines=1 --config_file=configs.py

Traceback (most recent call last):
  File "run_experiment.py", line 94, in <module>
    cfg.merge_from_file(FLAGS.config_file)
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 212, in merge_from_file
    cfg = self.load_cfg(f)
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 363, in load_cfg
    return cls._load_cfg_from_file(cfg_file_obj_or_str)
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 374, in _load_cfg_from_file
    return cls._load_cfg_py_source(file_obj.name)
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 393, in _load_cfg_py_source
    "Python module from file {} must have 'cfg' attr".format(filename),
  File "/opt/conda/lib/python3.6/site-packages/yacs/config.py", line 545, in _assert_with_logging
    assert cond, msg
AssertionError: Python module from file configs.py must have 'cfg' attr

I have the same error as you when train the codes. There is no experiments/test.yaml in the folder. How to solve the problem in the end?