Sharath-girish / LTH-ObjectRecognition

PyTorch implementation of the paper The Lottery Ticket Hypothesis for Object Recognition
21 stars 2 forks source link

AssertionError: Non-existent key: LOTTERY_KEEP_PERCENTAGE #3

Open CY-GAO222 opened 3 years ago

CY-GAO222 commented 3 years ago

Traceback (most recent call last): File "/home/gcy/anaconda3/envs/detectron2/lib/python3.7/site-packages/torch/multiprocessing/spawn.py", line 19, in _wrap fn(i, args) File "/home/gcy/anaconda3/envs/detectron2/lib/python3.7/site-packages/detectron2/engine/launch.py", line 94, in _distributed_worker main_func(args) File "/data2/gcy/pruning/prune_coco_nofile_det2/tools/train_net_prune.py", line 136, in main cfg = setup(args) File "/data2/gcy/pruning/prune_coco_nofile_det2/tools/train_net_prune.py", line 129, in setup cfg.merge_from_list(args.opts) File "/home/gcy/anaconda3/envs/detectron2/lib/python3.7/site-packages/fvcore/common/config.py", line 134, in merge_from_list return super().merge_from_list(cfg_list) File "/home/gcy/anaconda3/envs/detectron2/lib/python3.7/site-packages/yacs-0.1.8-py3.7.egg/yacs/config.py", line 243, in merge_from_list _assert_with_logging(subkey in d, "Non-existent key: {}".format(full_key)) File "/home/gcy/anaconda3/envs/detectron2/lib/python3.7/site-packages/yacs-0.1.8-py3.7.egg/yacs/config.py", line 545, in _assert_with_logging assert cond, msg AssertionError: Non-existent key: LOTTERY_KEEP_PERCENTAGE

itsMorteza commented 2 years ago

Hi the LOTTERY_KEEP_PERCENTAGE, and some other key should be added manually in config/deafult.py as mentioned in https://github.com/Sharath-girish/LTH-ObjectRecognition/blob/cba60fe5b92119346e81fe270da55a4b3a54cc67/prune_coco/detectron2/config/defaults.py#L618 and some other changes such as adding lth pruner in default of main engine functions of detectron2 is needed. or you could install from the setup.py.