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

How to save a pyannote pipeline #1119

Closed
Athena75 opened this issue Oct 28, 2022 · 1 comment
Closed

How to save a pyannote pipeline #1119

Athena75 opened this issue Oct 28, 2022 · 1 comment

Comments

@Athena75
Copy link

Athena75 commented Oct 28, 2022

Hello, I did not know how to save a pyannote audio pipeline

from pyannote.database.util import load_rttm
from pyannote.audio import Pipeline

pipeline = Pipeline.from_pretrained("pyannote/[email protected]",
                                    use_auth_token="TOKEN")


#LATER
pipeline.save_pretrained('pyannote-checkpoint')

->

AttributeError                            Traceback (most recent call last)
[<ipython-input-22-362b7b513b93>](https://localhost:8080/#) in <module>
      5                                     use_auth_token="TOKEN")
      6 
----> 7 pipeline.save_pretrained('pyannote-checkpoint')

[/usr/local/lib/python3.7/dist-packages/pyannote/pipeline/pipeline.py](https://localhost:8080/#) in __getattr__(self, name)
     98 
     99         msg = "'{}' object has no attribute '{}'".format(type(self).__name__, name)
--> 100         raise AttributeError(msg)
    101 
    102     def __setattr__(self, name, value):

AttributeError: 'SpeakerDiarization' object has no attribute 'save_pretrained'

Is there another way to save locally the pipeline
thx

hbredin added a commit that referenced this issue Nov 29, 2022
* related bugs: #1119 #1128 #1130
* related discussions: #1123 #1103 #1126 #1121
@hbredin
Copy link
Member

hbredin commented Nov 29, 2022

I have just updated the FAQ with instructions on how to use pretrained models and pipelines offline.

@hbredin hbredin closed this as completed Nov 29, 2022
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

No branches or pull requests

2 participants