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

Torchhub is broken on pytorch-nightly or dev versions #283

Closed
NicolasHug opened this issue Jan 7, 2023 · 3 comments
Closed

Torchhub is broken on pytorch-nightly or dev versions #283

NicolasHug opened this issue Jan 7, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@NicolasHug
Copy link

NicolasHug commented Jan 7, 2023

The version check introduced here:

silero-vad/hubconf.py

Lines 19 to 20 in e7c4539

def versiontuple(v):
return tuple(map(int, (v.split('+')[0].split("."))))

is valid for stable releases, but unfortunately fails on the pytorch-nightly versions strings which look like this: pytorch-2.0.0.dev20230107. This is causing our torchhub CI to fail with the following error:

E           Traceback (most recent call last):
E             File "python_code/snakers4_silero-vad_vad.py", line 9, in <module>
E               model, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad',
E             File "/home/circleci/miniconda3/lib/python3.8/site-packages/torch/hub.py", line 543, in load
E               model = _load_local(repo_or_dir, model, *args, **kwargs)
E             File "/home/circleci/miniconda3/lib/python3.8/site-packages/torch/hub.py", line 573, in _load_local
E               model = entry(*args, **kwargs)
E             File "/home/circleci/.cache/torch/hub/snakers4_silero-vad_master/hubconf.py", line 32, in silero_vad
E               if versiontuple(installed_version) < versiontuple(supported_version):
E             File "/home/circleci/.cache/torch/hub/snakers4_silero-vad_master/hubconf.py", line 20, in versiontuple
E               return tuple(map(int, (v.split('+')[0].split("."))))
E           ValueError: invalid literal for int() with base 10: 'dev20230105'

Would you mind updating the version check to something that can handle the .devXYZ suffix? Thank you!

@NicolasHug NicolasHug added the bug Something isn't working label Jan 7, 2023
@snakers4
Copy link
Owner

snakers4 commented Jan 7, 2023

@adamnsandle

@adamnsandle
Copy link
Collaborator

fixed!

@NicolasHug
Copy link
Author

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants