Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

SPOS hardware-aware nas multi_trial.py don't work #4198

Closed
GeorgeW9527 opened this issue Sep 18, 2021 · 4 comments · Fixed by #4214
Closed

SPOS hardware-aware nas multi_trial.py don't work #4198

GeorgeW9527 opened this issue Sep 18, 2021 · 4 comments · Fixed by #4214
Assignees
Labels

Comments

@GeorgeW9527
Copy link

GeorgeW9527 commented Sep 18, 2021

Describe the issue:

Environment: ubutu

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

Configuration:

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

Log message:

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

/opt/conda/envs/pytorch1.9/lib/python3.7/site-packages/deprecate/deprecation.py:115: LightningDeprecationWarning: The Accuracy was deprecated since v1.3.0 in favor of torchmetrics.classification.accuracy.Accuracy. It will be removed in v1.5.0.
stream(template_mgs % msg_args)
Traceback (most recent call last):
File "/opt/conda/envs/pytorch1.9/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/opt/conda/envs/pytorch1.9/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/notebook/code/personal/gzh/compression_toolkit/nni_v24/nni/nni/retiarii/trial_entry.py", line 25, in
engine.trial_execute_graph()
File "/home/notebook/code/personal/gzh/compression_toolkit/nni_v24/nni/nni/retiarii/execution/base.py", line 128, in trial_execute_graph
graph_data.evaluator._execute(model_cls)
File "/home/notebook/code/personal/gzh/compression_toolkit/nni_v24/nni/nni/retiarii/evaluator/pytorch/lightning.py", line 100, in _execute
return self.fit(model_cls)
File "/home/notebook/code/personal/gzh/compression_toolkit/nni_v24/nni/nni/retiarii/evaluator/pytorch/lightning.py", line 128, in fit
self.module.set_model(model)
File "/home/notebook/code/personal/gzh/compression_toolkit/nni_v24/nni/nni/retiarii/evaluator/pytorch/lightning.py", line 37, in set_model
self.model = model()
File "/home/notebook/code/personal/gzh/compression_toolkit/nni_v24/nni/examples/nas/oneshot/spos/_generated_model/G7UFOW.py", line 5580, in init
self.__first_conv = _model__first_conv(input_shape=[[1, 3, 32, 32]], output_shape=[[1, 16, 16, 16]])
TypeError: init() got an unexpected keyword argument 'input_shape'

我找到了G7UFOW.py文件,发现_model__first_conv类的构造函数没有入参(如下),确实有bug:
image

How to reproduce it?: just run

@ultmaster
Copy link
Contributor

Delegate to nn-meter team for support.

@JiahangXu
Copy link
Contributor

Delegate to nn-meter team for support.

Copy that. We will handle it as soon as possible.

@scarlett2018
Copy link
Member

Delegate to nn-meter team for support.

Copy that. We will handle it as soon as possible.

@JiahangXu - any updates for this issue? thanks.

@JiahangXu
Copy link
Contributor

Hi GeorgeW9527 and Scarlett, sorry for the late reply. This issue is in the process. The dev branch for nni is https://github.com/JiahangXu/nni/tree/dev-refine-shape-attr and for nn_meter is https://github.com/microsoft/nn-Meter/tree/dev/refine-shape-attr. The PR will be ready in one day.

@ultmaster ultmaster linked a pull request Oct 11, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants