Black : English  /  Blue : Korean

 

 

When you use NNI auto-ml in your code which assigned the hyperparameter through a 'parser' in train.py, AttributeError is occured.

train.py에서 parser를 통한 hyperparameter를 지정한 경우에 NNI auto-ml을 사용하는 경우 아래와 같은 에러가 발생하였다.

 

In my case, data_dir was declared like data_dir = args.data_dir, so I modified my code data_dir = args['data_dir']

data_dir 코드가 data_dir = args.data_dir로 작성되어 있었는데 이를 data_dir = args['data_dir']로 고쳐주면 error 자체는 사라진다.

 

Of course, you should not only modify that but also others (like shuffle=args.dataset -> shuffle=args['dataset'])

data_dir만 수정해주는 것이 아니라 shuffle=args.data 처럼 args.xx로 선언되어 있는 모든 것들을 args['']로 수정해주어야 한다.

+ Recent posts