question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError: module 's3prl' has no attribute 'hub'

See original GitHub issue

I am trying to run the latest version of s3prl. To do this, I have executed the following cmd:

git clone https://github.com/s3prl/s3prl.git
cd s3prl
pip install -e ./

then

cd s3prl
python3 run_downstream.py -m train -d asr -n AUDIO_ALBERT -u audio_albert 

But I am getting following error:

################################################################################
### WARNING, path does not exist: KALDI_ROOT=/mnt/matylda5/iveselyk/Tools/kaldi-trunk
###          (please add 'export KALDI_ROOT=<your_path>' in your $HOME/.profile)
###          (or run as: KALDI_ROOT=<your_path> python <your_script>.py)
################################################################################

[hubconf] can not import .upstream.decoar2.hubconf: No module named 'fairseq'... Pass.
[hubconf] can not import .upstream.hubert.hubconf: No module named 'fairseq'... Pass.
[hubconf] can not import .upstream.roberta.hubconf: No module named 'fairseq'... Pass.
[hubconf] can not import .upstream.pase.hubconf: No module named 'pase'... Pass.
Traceback (most recent call last):
  File "run_downstream.py", line 15, in <module>
    from s3prl import hub
  File "/home/users/Projects/s3prl/s3prl/hub.py", line 12, in <module>
    _module = _importlib.import_module(_module_name, package=__package__)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/users/Projects/s3prl/s3prl/upstream/mos_prediction/hubconf.py", line 4, in <module>
    from .expert import UpstreamExpert as _UpstreamExpert
  File "/home/users/Projects/s3prl/s3prl/upstream/mos_prediction/expert.py", line 6, in <module>
    import s3prl.hub as hub
AttributeError: module 's3prl' has no attribute 'hub'

To debug the error, I listed the installed modules using pip list

Package Version Location
s3prl 0.3.1 /home/users/Projects/s3prl

I think Location should be /home/users/Projects/s3prl/s3prl insted of /home/users/Projects/s3prl Could you please help me to resolve the aforementioned error?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ashishBTcommented, Sep 23, 2021

This issue has been resolved after updating my python from 3.6 to 3.8.

0reactions
leo19941227commented, Sep 23, 2021

Thanks for the information!

Read more comments on GitHub >

github_iconTop Results From Across the Web

module 'hub' has no attribute 'mockingjay_local' #248 - GitHub
I tried -u wav2vec2 with no success still: AttributeError: module ... 'hub' has no attribute 'mockingjay_local' with nothing in S3PRL: []
Read more >
AttributeError: module 'torch' has no attribute 'hub'
My pytorch version is 1.0.0, but I can't load the hub, why is this? pytorch.
Read more >
torch.hub — PyTorch 1.13 documentation
Pytorch Hub supports publishing pre-trained models(model definitions and pre-trained weights) to a github repository by adding a simple hubconf.py file;.
Read more >
s3prl_哈哈拉拉hxl的博客
预训练模型通过torch.hub注册,这意味着您可以通过一行即插即用在自己的项目 ... 解决anaconda 使用时AttributeError: module boto3 has no attribute ...
Read more >
espnet2.tasks.asr — ESPnet 202209 documentation
Source code for espnet2.tasks.asr ... Built with Sphinx using a theme provided by Read the Docs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found