AdaFocus icon indicating copy to clipboard operation
AdaFocus copied to clipboard

hydra error

Open VongolaWu opened this issue 2 years ago • 6 comments

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.

VongolaWu avatar Oct 16 '21 02:10 VongolaWu

meet too...

LawrenceXia2008 avatar Oct 16 '21 14:10 LawrenceXia2008

It seems the version should be 1.0.0

dreamerlin avatar Oct 16 '21 16:10 dreamerlin

It seems the version should be 1.0.0

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

VongolaWu avatar Oct 17 '21 03:10 VongolaWu

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.

FrozenBurning avatar Oct 17 '21 04:10 FrozenBurning

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)

LawrenceXia2008 avatar Oct 22 '21 09:10 LawrenceXia2008

@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.

FrozenBurning avatar Oct 27 '21 14:10 FrozenBurning