RaptorMai/online-continual-learning

Error running main_tune.py - Trouble exporting results

Closed this issue · 1 comments

I have just cloned the repo, successfully installed all the requirements in an Anaconda environment, and run the command for hyper-parameters tuning as shown in the 'readme' file:

python main_tune.py --general config/general_1.yml --data config/data/cifar100/cifar100_nc.yml --default config/agent/mir/mir_1k.yml --tune config/agent/mir/mir_tune.yml

The above command produced the following error:

AttributeError: 'types.SimpleNamespace' object has no attribute 'buffer_tracker'

Any idea on how to resolve this? My main goal is to run the example commands and save the training and evaluation results locally.
I decided to run the 'hyper-parameters tuning' command because running the 'general_main.py' did not save any results despite running successfully (I tried setting the '--store' parameter to 'True').

The complete error from running the hyperparameter tuning command:

Traceback (most recent call last):
  File "main_tune.py", line 59, in <module>
    main(args)
  File "main_tune.py", line 41, in main
    multiple_run_tune_separate(final_default_params, tune_params, args.save_path)
  File "K:\online-continual-learning\experiment\run.py", line 218, in multiple_run_tune_separate
    single_tune(data_continuum, default_params, tune_params, params_keep, tmp_acc, run)
  File "K:\online-continual-learning\experiment\run.py", line 252, in single_tune
    best_params = tune_hyper(tune_data, tune_test_loaders, default_params, tune_params, )
  File "K:\online-continual-learning\experiment\tune_hyperparam.py", line 26, in tune_hyper
    agent = agents[final_params.agent](model, opt, final_params)
  File "K:\online-continual-learning\agents\exp_replay.py", line 13, in __init__
    self.buffer = Buffer(model, params)
  File "K:\online-continual-learning\utils\buffer\buffer.py", line 33, in __init__
    if self.params.buffer_tracker:
AttributeError: 'types.SimpleNamespace' object has no attribute 'buffer_tracker'

Hi @Frapais. I think the .yml files in /config have not been updated to the latest version by the authors. For me, I just add the missing arguments in the corresponding .yml file to run the codes. You can try adding 'buffer_tracker: False' and error_analysis: False in config/general_1.yml, and then run the command.