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

Update Huggingface Hub version #1098

Merged
merged 1 commit into from
Oct 9, 2022
Merged

Conversation

philschmid
Copy link
Contributor

@philschmid philschmid commented Oct 7, 2022

What does this PR do?

This PR updates the huggingface_hub package to avoid conflicts with libraries that use >0.9

@Majdoddin
Copy link

Majdoddin commented Oct 7, 2022

This is also important to resolve a version conflict with openai/whisper reported here

I doesn't seem that your commit is enough to resolve the issue, I just got an error:

!pip install git+https://github.com/pyannote/pyannote-audio.git@refs/pull/1098/merge

from pyannote.audio import Pipeline
pipeline = Pipeline.from_pretrained('pyannote/speaker-diarization')


ValueError Traceback (most recent call last)

in
1 from pyannote.audio import Pipeline
2
----> 3 pipeline = Pipeline.from_pretrained('pyannote/speaker-diarization')

1 frames

/usr/local/lib/python3.7/dist-packages/pyannote/audio/core/pipeline.py in from_pretrained(cls, checkpoint_path, hparams_file, use_auth_token, cache_dir)
104
105 if "params" in config:
--> 106 pipeline.instantiate(config["params"])
107
108 if hparams_file is not None:

/usr/local/lib/python3.7/dist-packages/pyannote/pipeline/pipeline.py in instantiate(self, params)
442
443 msg = f"parameter '{name}' does not exist"
--> 444 raise ValueError(msg)
445
446 self.initialize()

ValueError: parameter 'segmentation_onset' does not exist

@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Base: 30.20% // Head: 30.20% // No change to project coverage 👍

Coverage data is based on head (79e1df6) compared to base (b3d9372).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1098   +/-   ##
========================================
  Coverage    30.20%   30.20%           
========================================
  Files           61       61           
  Lines         3751     3751           
========================================
  Hits          1133     1133           
  Misses        2618     2618           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@crazy4pi314
Copy link

Is there something blocking the macos build? This may be related to an issue downstream in openai/whisper: openai/whisper#264

@hbredin hbredin merged commit 7ead17e into pyannote:develop Oct 9, 2022
@hbredin
Copy link
Member

hbredin commented Oct 9, 2022

Will be part of next release. No ETA, though.

@philschmid
Copy link
Contributor Author

I created a fork on the 2.0.1 release, which patches the huggingface_hub version: https://github.com/philschmid/pyannote-audio/tree/hub0.10

you can install it with pip install git+https://github.com/philschmid/pyannote-audio.git@hub0.10 --upgrade

@lukas681
Copy link

lukas681 commented Oct 13, 2022

Thanks @philschmid! I can confirm that this solves the entire issue.

One addendum from my side:
@Majdoddin: I was facing this problem as well when I tried this simple fix here and installed it via pip directly from the commit. So there should not have been any differences between the hard fork of @philschmid. After I first got this segmentation_onset stuff I tried to fix it in the source local code directly as another workaround by deleting this specific property, but it not really worked. Creating a new venv and installing the correct versions for my CUDA device (especially pytorch + CUDA level 11+/RTX 3070) from scratch did allow me to have the coexistence of whisper and pyannote-audio without the workaround of postponing the installation. So maybe deleting all dependencies could also fix it on your side.
This is my environment, maybe it helps:
requirements.txt:

spacy
whisper
spacy-sentiws
numpy
tqdm
more-itertools
transformers>=4.19.0
ffmpeg-python==0.2.0
# pyannote.audio Using development branch
webvtt-py
pandas
pandas-compat

environment creation (Make):

venv/bin/activate: requirements.txt
    python3 -m venv venv
    venv/bin/pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
    ./venv/bin/pip install git+https://github.com/philschmid/pyannote-audio.git@hub0.10  --upgrade
    ./venv/bin/pip install -r requirements.txt

@Majdoddin
Copy link

Thank you for the clean solution @lukas681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants