GithubHelp home page GithubHelp logo

Comments (11)

userzsy1108 avatar userzsy1108 commented on August 19, 2024 1

if torch == 1.12.1, mmcv==??, I meet the same question. Can you tell me the right version? Thank you very much!

from learn-to-cluster.

yl-1993 avatar yl-1993 commented on August 19, 2024

Hi @keeprunningcelin, have you modified the vegcn/configs/cfg_test_gcne_ms1m.py? It is a bit of weird that the AttributeError is raised when parsing the config. BTW, does sh scripts/vegcn/test_gcn_v_ms1m.sh work well?

from learn-to-cluster.

rose-jinyang avatar rose-jinyang commented on August 19, 2024

Hi
I also met the same issue.
I ran sh scripts/vegcn/train_gcn_v_ms1m.sh

AttributeError: 'ConfigDict' object has no attribute 'model'
Traceback (most recent call last):
File "vegcn/main.py", line 104, in
main()
File "vegcn/main.py", line 47, in main
cfg = Config.fromfile(args.config)
File "/home/vishwam/anaconda3/lib/python3.7/site-packages/mmcv/utils/config.py", line 152, in fromfile
cfg_dict, cfg_text = Config._file2dict(filename)
File "/home/vishwam/anaconda3/lib/python3.7/site-packages/mmcv/utils/config.py", line 91, in _file2dict
mod = import_module('_tempconfig')
File "/home/vishwam/anaconda3/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/var/tmp/tmppvw8pasv/_tempconfig.py", line 38, in
File "/home/vishwam/anaconda3/lib/python3.7/site-packages/mmcv/utils/config.py", line 264, in getattr
return getattr(self._cfg_dict, name)
File "/home/vishwam/anaconda3/lib/python3.7/site-packages/mmcv/utils/config.py", line 34, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'model'

What is your mmcv version?

from learn-to-cluster.

yl-1993 avatar yl-1993 commented on August 19, 2024

@keeprunningcelin @rose-jinyang Thanks for posting the issue. As discussed with @rose-jinyang, it seems to be the problem of mmcv version. In my test, it works fine under mmcv==0.2.5 and mmcv==0.2.14. I will try to fix it under the latest mmcv.

from learn-to-cluster.

rose-jinyang avatar rose-jinyang commented on August 19, 2024

You're right. It works well under mmcv==0.2.14. Thanks

from learn-to-cluster.

yl-1993 avatar yl-1993 commented on August 19, 2024

Hi @keeprunningcelin, for current usage, you may need to switch to previous version of mmcv by pip install mmcv==0.3.2. It works well when mmcv is under 0.4.0.

Besides, I post an issue on open-mmlab/mmcv#248 to discuss this problem. You can keep an eye on the discussions.

from learn-to-cluster.

keeprunningcelin avatar keeprunningcelin commented on August 19, 2024

Thanks @yl-1993 .I change the version of mmcv. It works well.

from learn-to-cluster.

yl-1993 avatar yl-1993 commented on August 19, 2024

Hi @keeprunningcelin, mmcv has fixed this issue. I think it be available after next mmcv release. View the above issue to check more details.

from learn-to-cluster.

linjiawen2019 avatar linjiawen2019 commented on August 19, 2024

@yl-1993 Hi, I ran train_gcn_e_ms1m.py to train my own dataset, but also met the similar problem:

Traceback (most recent call last):
File "vegcn/main.py", line 104, in
main()
File "vegcn/main.py", line 47, in main
cfg = Config.fromfile(args.config)
File "/data3/linjiawen/anaconda3/envs/pytorch1.0/lib/python3.7/site-packages/mmcv/utils/config.py", line 86, in fromfile
mod = import_module(module_name)
File "/data3/linjiawen/anaconda3/envs/pytorch1.0/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/data3/linjiawen/learn-to-cluster/vegcn/configs/cfg_train_gcne_ms1m.py", line 63, in
extract_gcn_v(test_feat_path, test_pred_conf_path, 'test_data', gcnv_cfg)
File "/data3/linjiawen/learn-to-cluster/vegcn/extract.py", line 28, in extract_gcn_v
dataset = build_dataset(cfg.model['type'], cfg[data_name])
File "/data3/linjiawen/learn-to-cluster/vegcn/datasets/init.py", line 13, in build_dataset
return factorymodel_type
File "/data3/linjiawen/learn-to-cluster/vegcn/datasets/gcn_v_dataset.py", line 50, in init
knn_prefix = os.path.join(cfg.prefix, 'knns', cfg.name)
File "/data3/linjiawen/anaconda3/envs/pytorch1.0/lib/python3.7/site-packages/mmcv/utils/config.py", line 28, in getattr
raise ex
AttributeError: 'ConfigDict' object has no attribute 'prefix'

I tried several version of mmcv but still failed, 0.2.15, 0.2.14, 0.3.2 they didn't work. And I checked the config file "cfg_train_gcnv_ms1m.py" there is a "predix" in it. Could you tell whether the newest version of mmcv works?

Before this I have met "AttributeError: 'ConfigDict' object has no attribute 'model' ", and I changed the mmcv version to 0.3.2 and it worked, but now I have this. Thanks for your reply!

from learn-to-cluster.

yl-1993 avatar yl-1993 commented on August 19, 2024

@linjiawen2019 Could you please give more detailed information about your environment?
I tested it under following settings and they all seemed to work well.
(1) torch==1.1.0, mmcv==0.5.6;
(2) torch==1.1.0, mmcv==0.3.2;
(3) torch==0.4.0, mmcv==0.2.15

from learn-to-cluster.

yimilirui avatar yimilirui commented on August 19, 2024

@linjiawen2019您能不能提供有关您的环境的更多详细信息? 我在下面的设置下对其进行了测试,它们似乎都运行良好。 (1) torch==1.1.0, mmcv==0.5.6; (2) torch==1.1.0, mmcv==0.3.2; (3) torch==0.4.0,mmcv==0.2.15

if torch == 1.7.1, mmcv==??, I meet the same question. Can you tell me the right version? Thank you very much!

from learn-to-cluster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.