mikelzc1990 / nsganetv2

[ECCV2020] NSGANetV2: Evolutionary Multi-Objective Surrogate-Assisted Neural Architecture Search
Apache License 2.0
147 stars 34 forks source link

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

Open euminds opened 3 years ago

euminds commented 3 years ago

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 commented 3 years ago

@mikelzc1990

euminds commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

did you solve this?

ngctnnnn commented 2 years ago

Try this version: pip install git+https://github.com/mit-han-lab/once-for-all@afdb78dea1ca0c12a7cb8f803ac7a576cac7ce18

hjnwyt commented 4 months ago

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.