From de51e9fc1516495dcf22016bbcc4d9051eb5a3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BREDIN?= Date: Sat, 4 Oct 2025 14:19:04 +0200 Subject: [PATCH 1/6] feat: add support for pipeline config in get_pipeline (#1930) --- CHANGELOG.md | 4 ++++ src/pyannote/audio/pipelines/utils/getter.py | 12 +++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa509b01..a48313ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## Next + +- feat: allow passing preloaded pipeline config to `get_pipeline` + ## Version 4.0.0 (2025-09-29) ### TL;DR diff --git a/src/pyannote/audio/pipelines/utils/getter.py b/src/pyannote/audio/pipelines/utils/getter.py index b37c55b5..c9e4d44a 100644 --- a/src/pyannote/audio/pipelines/utils/getter.py +++ b/src/pyannote/audio/pipelines/utils/getter.py @@ -46,9 +46,15 @@ def get_pipeline( _pipeline = Pipeline.from_pretrained(pipeline, token=token, cache_dir=cache_dir) elif isinstance(pipeline, dict): - pipeline.setdefault("token", token) - pipeline.setdefault("cache_dir", cache_dir) - _pipeline = Pipeline.from_pretrained(**pipeline) + if "checkpoint" in pipeline: + pipeline.setdefault("token", token) + pipeline.setdefault("cache_dir", cache_dir) + _pipeline = Pipeline.from_pretrained(**pipeline) + + else: + _pipeline = Pipeline.from_pretrained( + pipeline, token=token, cache_dir=cache_dir + ) else: raise TypeError( From 7fda5e1bbb0be8f5f6908ae9247d1fcee4573b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BREDIN?= Date: Sat, 4 Oct 2025 14:20:11 +0200 Subject: [PATCH 2/6] fix: relax version constraint on OpenTelemetry dependency (#1931) fixes #1927 --- CHANGELOG.md | 3 ++- pyproject.toml | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a48313ec..8a70aabd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # CHANGELOG -## Next +## `develop` branch - feat: allow passing preloaded pipeline config to `get_pipeline` +- fix: relax version constraint on OpenTelemetry dependency ## Version 4.0.0 (2025-09-29) diff --git a/pyproject.toml b/pyproject.toml index afb1fbb6..86d1c023 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,9 +12,9 @@ dependencies = [ "einops>=0.8.1", "huggingface-hub>=0.28.1", "lightning>=2.4", - "opentelemetry-api==1.34.0", - "opentelemetry-sdk==1.34.0", - "opentelemetry-exporter-otlp==1.34.0", + "opentelemetry-api>=1.34.0", + "opentelemetry-sdk>=1.34.0", + "opentelemetry-exporter-otlp>=1.34.0", "pyannote-core>=6.0.1", "pyannote-database>=6.0.0", "pyannote-metrics>=4.0.0", From 5e7f73b5fe19322d3fed169b28c17cffdf2b27c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BREDIN?= Date: Sat, 4 Oct 2025 14:24:32 +0200 Subject: [PATCH 3/6] setup: update pyannoteai-sdk dependency (#1932) --- CHANGELOG.md | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a70aabd..6f8d8732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,8 @@ ## `develop` branch - feat: allow passing preloaded pipeline config to `get_pipeline` -- fix: relax version constraint on OpenTelemetry dependency +- fix: relax version constraint on OpenTelemetry dependencies +- setup: update pyannoteai-sdk dependency ## Version 4.0.0 (2025-09-29) diff --git a/pyproject.toml b/pyproject.toml index 86d1c023..52257f52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "torchmetrics>=1.6.1", "soundfile>=0.13.1", "matplotlib>=3.10.0", - "pyannoteai-sdk>=0.2.1", + "pyannoteai-sdk>=0.2.2", ] [project.scripts] From e528cd4780832f359438769e8674bd7419f461d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BREDIN?= Date: Wed, 8 Oct 2025 10:07:26 +0200 Subject: [PATCH 4/6] improve: warn (instead of raise) on unsupported arguments --- CHANGELOG.md | 1 + src/pyannote/audio/pipelines/speaker_diarization.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80a1efb6..4068e973 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - feat: allow passing preloaded pipeline config to `get_pipeline` - fix: relax version constraint on OpenTelemetry dependencies - setup: update pyannoteai-sdk dependency +- improve: warn (instead of raise) when passing unsupported arguments to speaker diarization pipeline ## Version 4.0.0 (2025-09-29) diff --git a/src/pyannote/audio/pipelines/speaker_diarization.py b/src/pyannote/audio/pipelines/speaker_diarization.py index 3b80033d..e197d031 100644 --- a/src/pyannote/audio/pipelines/speaker_diarization.py +++ b/src/pyannote/audio/pipelines/speaker_diarization.py @@ -534,6 +534,7 @@ class SpeakerDiarization(SpeakerDiarizationMixin, Pipeline): min_speakers: Optional[int] = None, max_speakers: Optional[int] = None, hook: Optional[Callable] = None, + **kwargs, ) -> DiarizeOutput | Annotation: """Apply speaker diarization @@ -561,6 +562,12 @@ class SpeakerDiarization(SpeakerDiarizationMixin, Pipeline): output : DiarizeOutput (or Annotation if `self.legacy` is True) """ + # warn about unsupported kwargs + if len(kwargs) > 0: + warnings.warn( + f"Ignoring unexpected keyword arguments: {', '.join(list(kwargs.keys()))}" + ) + # setup hook (e.g. for debugging purposes) hook = self.setup_hook(file, hook=hook) From fc3acfa4a44bf50eaeb999b434b6a6b2c20569d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BREDIN?= Date: Fri, 10 Oct 2025 14:16:00 +0200 Subject: [PATCH 5/6] setup: update to pyannoteai-sdk 0.3.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 52257f52..39087f04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "torchmetrics>=1.6.1", "soundfile>=0.13.1", "matplotlib>=3.10.0", - "pyannoteai-sdk>=0.2.2", + "pyannoteai-sdk>=0.3.0", ] [project.scripts] From 0d49ca873f30716d98d3a0423da86d739687fe44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BREDIN?= Date: Fri, 10 Oct 2025 14:23:57 +0200 Subject: [PATCH 6/6] doc: update changelog --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4068e973..2dbd9a96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ # CHANGELOG -## `develop` branch +## Version 4.0.1 (2025-10-10) - feat: allow passing preloaded pipeline config to `get_pipeline` -- fix: relax version constraint on OpenTelemetry dependencies -- setup: update pyannoteai-sdk dependency +- setup: update `pyannoteai-sdk` dependency to `0.3.0` +- fix: relax version constraint on `OpenTelemetry` dependencies - improve: warn (instead of raise) when passing unsupported arguments to speaker diarization pipeline ## Version 4.0.0 (2025-09-29)