Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'ofa.imagenet_codebase' #8

Open
euminds opened this issue Feb 21, 2021 · 6 comments
Open

ModuleNotFoundError: No module named 'ofa.imagenet_codebase' #8

euminds opened this issue Feb 21, 2021 · 6 comments

Comments

@euminds
Copy link

euminds commented Feb 21, 2021

I encounter an error again when searching. An error is reported when the configured ofa version is ofa 0.1.0-202012082159. Then try ofa 0.0.4-2012082155 but the same error still occurs.
Traceback (most recent call last):
File "msunas.py", line 8, in
from evaluator import OFAEvaluator, get_net_info
File "/data8T/nsganetv2-master/evaluator.py", line 8, in
from codebase.networks import NSGANetV2
File "/data8T/nsganetv2-master/codebase/networks/init.py", line 1, in
from ofa.imagenet_codebase.networks.proxyless_nets import ProxylessNASNets, proxyless_base, MobileNetV2
ModuleNotFoundError: No module named 'ofa.imagenet_codebase'

@euminds
Copy link
Author

euminds commented Feb 21, 2021

@mikelzc1990

@euminds
Copy link
Author

euminds commented Feb 23, 2021

I tried a lower version of OnceForALL, the above problem no longer appears, but a new error appears. Error: mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library.
Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it.
My current pytorch version is 1.6.0. It may be a problem with the pytorch version. I try to use pytorch 1.5.1.
In addition, another error occurred:
Traceback (most recent call last):
File "msunas.py", line 355, in
main(cfgs)
File "msunas.py", line 310, in main
engine.search()
File "msunas.py", line 79, in search
acc_predictor, a_top1_err_pred = self._fit_acc_predictor(archive)
File "msunas.py", line 180, in _fit_acc_predictor
acc_predictor = get_acc_predictor(self.predictor, inputs, targets)
File "/data8T/nsganetv2-master/acc_predictor/factory.py", line 6, in get_acc_predictor
acc_predictor.fit(inputs, targets)
File "/data8T/nsganetv2-master/acc_predictor/rbf.py", line 29, in fit
dim=train_data.shape[1], kernel=kernel(), tail=tail(train_data.shape[1]))
TypeError: init() missing 2 required positional arguments:'lb' and'ub'
@mikelzc1990

@Kirito-520
Copy link

I tried a lower version of OnceForALL, the above problem no longer appears, but a new error appears. Error: mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library.
Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it.
My current pytorch version is 1.6.0. It may be a problem with the pytorch version. I try to use pytorch 1.5.1.
In addition, another error occurred:
Traceback (most recent call last):
File "msunas.py", line 355, in
main(cfgs)
File "msunas.py", line 310, in main
engine.search()
File "msunas.py", line 79, in search
acc_predictor, a_top1_err_pred = self._fit_acc_predictor(archive)
File "msunas.py", line 180, in _fit_acc_predictor
acc_predictor = get_acc_predictor(self.predictor, inputs, targets)
File "/data8T/nsganetv2-master/acc_predictor/factory.py", line 6, in get_acc_predictor
acc_predictor.fit(inputs, targets)
File "/data8T/nsganetv2-master/acc_predictor/rbf.py", line 29, in fit
dim=train_data.shape[1], kernel=kernel(), tail=tail(train_data.shape[1]))
TypeError: init() missing 2 required positional arguments:'lb' and'ub'
@mikelzc1990

Hey, missing the lb and ub do you solve them?

@aswanthkrishna
Copy link

did you solve this?

@ngctnnnn
Copy link

ngctnnnn commented Apr 4, 2022

@hjnwyt
Copy link

hjnwyt commented Apr 25, 2024

I encounter an error again when searching. An error is reported when the configured ofa version is ofa 0.1.0-202012082159. Then try ofa 0.0.4-2012082155 but the same error still occurs. Traceback (most recent call last): File "msunas.py", line 8, in from evaluator import OFAEvaluator, get_net_info File "/data8T/nsganetv2-master/evaluator.py", line 8, in from codebase.networks import NSGANetV2 File "/data8T/nsganetv2-master/codebase/networks/init.py", line 1, in from ofa.imagenet_codebase.networks.proxyless_nets import ProxylessNASNets, proxyless_base, MobileNetV2 ModuleNotFoundError: No module named 'ofa.imagenet_codebase'

I had a similar problem, maybe it's because the module you need is not in ofa.imagenet_codebase, I suggest you check the module location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants