blackfeather-wang / AdaFocus

Reducing spatial redundancy in video recognition. SOTA computational efficiency.
123 stars 16 forks source link

hydra error #4

Closed VongolaWu closed 1 year ago

VongolaWu commented 3 years ago

Hi, when I run the program. It will raise an error about the hydra module. It seems that the "strict" parameter has already been deprecated from the hydra 1.0 version. But after I remove the "strict". Another error about the default.yaml appears. image Also I don't see the "pretty" argument in the "default.yaml" file. Thanks for your help in advance.

LawrenceXia2008 commented 3 years ago

meet too...

dreamerlin commented 3 years ago

It seems the version should be 1.0.0

VongolaWu commented 3 years ago

It seems the version should be 1.0.0

I just tried the 1.0.0 version. Still doesn't work.

FrozenBurning commented 3 years ago

Thanks for your interest in our work. Please pull the latest code for compatibility with hydra 1.1. args.pretty() has been deprecated in omegaconf>=2.0 (check this issue for details). If your hydra is newly installed, the latest code should help.

LawrenceXia2008 commented 3 years ago

you can just extract all args by this code:

args = parser.parse_args() 
with open(args.config, 'r') as f: 
config = yaml.load(f, Loader=yaml.FullLoader) 
   config.update(vars(args)) 
 args = Namespace(**config)
FrozenBurning commented 3 years ago

@LawrenceXia2008 Thanks for your great code snippets! That's indeed another way to load args without the dependency on hydra. However, there is one more thing which you should pay attention to that the training.log will be directly written to the current directory without hydra.