nni icon indicating copy to clipboard operation
nni copied to clipboard

Attribute error when using nnictl view [experiment ID] from terminal in WSL.

Open lrlofgren opened this issue 2 years ago • 6 comments

I cannot view old experiments. When I use the nnictl view command I get an attribute error: raise AttributeError(f'{class_name} does not have field(s) {fields}')

Entire error pasted below.

(.venv) root@anesth-lars:/algorithm_dev/NeuralNetV1# nnictl view k21rd3pf Traceback (most recent call last): File "/algorithm_dev/NeuralNetV1/.venv/bin/nnictl", line 8, in sys.exit(parse_args()) File "/algorithm_dev/NeuralNetV1/.venv/lib/python3.8/site-packages/nni/tools/nnictl/nnictl.py", line 286, in parse_args args.func(args) File "/algorithm_dev/NeuralNetV1/.venv/lib/python3.8/site-packages/nni/tools/nnictl/launcher.py", line 129, in view_experiment exp = Experiment._view(exp_id, exp_dir) File "/algorithm_dev/NeuralNetV1/.venv/lib/python3.8/site-packages/nni/experiment/experiment.py", line 273, in _view exp.config = launcher.get_stopped_experiment_config(exp_id, exp_dir) File "/algorithm_dev/NeuralNetV1/.venv/lib/python3.8/site-packages/nni/experiment/launcher.py", line 257, in get_stopped_experiment_config config = ExperimentConfig(**config_json) File "/algorithm_dev/NeuralNetV1/.venv/lib/python3.8/site-packages/nni/experiment/config/experiment_config.py", line 86, in init super().init(**kwargs) File "/algorithm_dev/NeuralNetV1/.venv/lib/python3.8/site-packages/nni/experiment/config/base.py", line 93, in init raise AttributeError(f'{class_name} does not have field(s) {fields}') AttributeError: ExperimentConfig does not have field(s) executionengine

Environment:

  • NNI version:
  • Training service (local|remote|pai|aml|etc):
  • Client OS:
  • Server OS (for remote mode only):
  • Python version:
  • PyTorch/TensorFlow version:
  • Is conda/virtualenv/venv used?:
  • Is running in Docker?:

Configuration:

  • Experiment config (remember to remove secrets!):
  • Search space:

Log message:

  • nnimanager.log:
  • dispatcher.log:
  • nnictl stdout and stderr:

How to reproduce it?:

lrlofgren avatar Apr 07 '22 22:04 lrlofgren

Should add that this problem only occurs when trying to view NAS experiments.... can view HPO experiments just fine.

Also,

here is my experiment set up if name == 'main': base_model = Net()

search_strategy = strategy.RegularizedEvolution(optimize_mode='maximize')
model_evaluator = FunctionalEvaluator(evaluate_model)

exp = RetiariiExperiment(base_model, model_evaluator, [], search_strategy)
exp_config = RetiariiExeConfig('local')
exp_config.training_service.use_active_gpu = True
exp_config.training_service.trial_gpu_number = 1
exp_config.training_service.max_trial_number_per_gpu = 4
exp_config.experiment_name = 'NAS_Search'
exp_config.trial_concurrency = 4
exp_config.max_trial_number = 300
exp_config.execution_engine = 'py'

exp.run(8081)

print('Final Model:')
for model_code in exp.export_top_models(formatter='dict'):
    print(model_code)

lrlofgren avatar Apr 08 '22 15:04 lrlofgren

I did notice that in the Config settings on the web UI it is listed as executionEngine (shown in the image), whereas the error says ExperimentConfig does not have field executionengine. not sure if the difference in capitlization matters. image

lrlofgren avatar Apr 08 '22 21:04 lrlofgren

RetiariiExperiment can't be "viewed" with nnictl view.

What's your intention here? Do you want to inspect a stopped NAS experiment?

matluster avatar Apr 13 '22 12:04 matluster

yes, I am trying to view a stopped experiment

lrlofgren avatar Apr 21 '22 14:04 lrlofgren

Why can't RetiariiExperiment be viewed with nnictl view? The nnictl web UI seems to work just fine when the experiment is running -- how do I get back to the same view after the experiment has completed?

cjrd avatar Apr 27 '22 20:04 cjrd

Echoing the views shared above. I want to inspect my completed experiments and dive into the visualizations presented on the screen. Currently I cannot navigate through the UI once experiments have concluded, making it almost useless.

RitwikGupta avatar May 16 '22 15:05 RitwikGupta

Closing this as RetiariiExperiment.view is already supported in v2.9.

ultmaster avatar Sep 09 '22 08:09 ultmaster