huawei-noah / vega

AutoML tools chain
http://www.noahlab.com.hk/opensource/vega/
Other
842 stars 175 forks source link

CARS, TypeError: unsupported operand type(s) for 'in': 'str' and 'EnumMeta' #128

Closed sven9972 closed 3 years ago

sven9972 commented 3 years ago

I use 'vega ./nas/cars/cars.yml' in 'examples'. But I meet this problem as follows:

File "/home/zlight/anaconda3/bin/vega", line 33, in sys.exit(load_entry_point('noah-vega==1.3.0.20210321', 'console_scripts', 'vega')()) File "/home/zlight/anaconda3/lib/python3.8/site-packages/noah_vega-1.3.0.20210321-py3.8.egg/vega/tools/run_pipeline.py", line 134, in run_pipeline _set_backend(args) File "/home/zlight/anaconda3/lib/python3.8/site-packages/noah_vega-1.3.0.20210321-py3.8.egg/vega/tools/run_pipeline.py", line 102, in _set_backend vega.set_backend("pytorch", args.device) File "/home/zlight/anaconda3/lib/python3.8/site-packages/noah_vega-1.3.0.20210321-py3.8.egg/vega/core/backend_register.py", line 60, in set_backend register_zeus(backend) File "/home/zlight/anaconda3/lib/python3.8/site-packages/noah_vega-1.3.0.20210321-py3.8.egg/zeus/init.py", line 22, in register_zeus from zeus.trainer import register_trainer, trainer_api File "/home/zlight/anaconda3/lib/python3.8/site-packages/noah_vega-1.3.0.20210321-py3.8.egg/zeus/trainer/trainer_api.py", line 14, in from zeus.trainer.trainer_base import TrainerBase File "/home/zlight/anaconda3/lib/python3.8/site-packages/noah_vega-1.3.0.20210321-py3.8.egg/zeus/trainer/trainer_base.py", line 19, in from zeus.trainer.callbacks import CallbackList File "/home/zlight/anaconda3/lib/python3.8/site-packages/noah_vega-1.3.0.20210321-py3.8.egg/zeus/trainer/callbacks/init.py", line 1, in from .callback import Callback File "/home/zlight/anaconda3/lib/python3.8/site-packages/noah_vega-1.3.0.20210321-py3.8.egg/zeus/trainer/callbacks/callback.py", line 17, in class Callback(object): File "/home/zlight/anaconda3/lib/python3.8/site-packages/noah_vega-1.3.0.20210321-py3.8.egg/zeus/common/class_factory.py", line 81, in wrapper if type_name in SearchSpaceType: File "/home/zlight/anaconda3/lib/python3.8/enum.py", line 315, in contains raise TypeError( TypeError: unsupported operand type(s) for 'in': 'str' and 'EnumMeta'

this method also has this problem : /vega-master/vega/algorithms/nas/cars$ python cars_alg.py
Traceback (most recent call last): File "cars_alg.py", line 26, in from vega.algorithms.nas.darts_cnn import DartsNetworkTemplateConfig File "/home/zlight/vega-master/vega/algorithms/nas/darts_cnn/init.py", line 1, in from .darts_codec import DartsCodec File "/home/zlight/vega-master/vega/algorithms/nas/darts_cnn/darts_codec.py", line 20, in class DartsCodec(Codec): File "/home/zlight/vega-master/zeus/common/class_factory.py", line 81, in wrapper if type_name in SearchSpaceType: File "/home/zlight/anaconda3/lib/python3.8/enum.py", line 315, in contains raise TypeError( TypeError: unsupported operand type(s) for 'in': 'str' and 'EnumMeta'

Looking forward to your reply, thank you very very much!!!

zhangjiajin commented 3 years ago

@sven9972 Python 3.8 processes the enum type differently than earlier versions. We will adapt to Python 3.8 and later in the next release. Please use python 3.7 and try again.

sven9972 commented 3 years ago

thanks ! !!