Open Ashh-Z opened 7 months ago
Please update the MRE to also take care of installing dependencies. It fails at the first cell.
I haven't investigated it yet, I don't really understand where it can come from, but I encountered the problem recently and adding back the segmentation threshold fixed it (even though I'm using a powerset multiclass model).
PIPELINE_PARAMS = {
"clustering": {
"method": "centroid",
"min_cluster_size": 15,
"threshold": 0.6285824248662424,
},
"segmentation": {
"min_duration_off": 0.0,
"threshold": 0.5,
},
}
Alright I think the problem is simply that the author of the issue and myself actually use multilabel models :) So of course the segmentation threshold is needed.
@Ashh-Z either add the segmentation threshold pipeline parameter if indeed you want to use multilabel, or add max_speakers_per_frame
in your task to make the model powerset multiclass.
That should solve the issue.
Alright I think the problem is simply that the author of the issue and myself actually use multilabel models :) So of course the segmentation threshold is needed.
@Ashh-Z either add the segmentation threshold pipeline parameter if indeed you want to use multilabel, or add
max_speakers_per_frame
in your task to make the model powerset multiclass. That should solve the issue.
Thank you for your reply. I had faced this issue when I was trying to finetune the model on my dataset. Initial fintuning was done and then there was a step to find the optimal segmentation threshold. In this step I had faced this issue.
I was referring to the following tutorial : https://github.com/pyannote/pyannote-audio/blob/develop/tutorials/adapting_pretrained_pipeline.ipynb
If you used the same model as in your issue (pyannote/segmentation-3.0
), then it's probably because it does not have a threshold so the tuning/instantiation might fail if you follow the tutorial.
Tested versions
System information
linux - pyannote 3.1
Issue description
Unable to instantiate parameters on trained pipeline
Code for fine tuning :
Running the model :
RuntimeError Traceback (most recent call last) Cell In[34], line 37 34 # pre_save = os.path.join(pre,f'{ uri }.rttm') 36 print('getting output') ---> 37 out_adapted = pipeline_adapted(file) 38 print('got it') 39 print(f"writting fine tune rttm for {uri}")
File ~/anaconda3/envs/env2/lib/python3.10/site-packages/pyannote/audio/core/pipeline.py:304, in Pipeline.call(self, file, **kwargs) 302 default_parameters = self.default_parameters() 303 except NotImplementedError: --> 304 raise RuntimeError( 305 "A pipeline must be instantiated with
pipeline.instantiate(parameters)
before it can be applied." 306 ) 308 try: 309 self.instantiate(default_parameters)RuntimeError: A pipeline must be instantiated with
pipeline.instantiate(parameters)
before it can be applied.Minimal reproduction example (MRE)
https://colab.research.google.com/drive/1PECWh2shDzR0bGo_nbUz3o3kG2tie0_F?usp=sharing