From a97e433cbc523fdb26af10efe5460ec3fb8b036b Mon Sep 17 00:00:00 2001 From: Kirill Radzikhovskyy Date: Mon, 6 Apr 2026 08:22:36 +1000 Subject: [PATCH 1/2] python3Packages.hyperpyyaml: fix compatibility with ruamel-yaml 0.19 --- .../python-modules/hyperpyyaml/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hyperpyyaml/default.nix b/pkgs/development/python-modules/hyperpyyaml/default.nix index 0c9ebca66166..72b74de94d96 100644 --- a/pkgs/development/python-modules/hyperpyyaml/default.nix +++ b/pkgs/development/python-modules/hyperpyyaml/default.nix @@ -26,6 +26,19 @@ buildPythonPackage rec { hash = "sha256-/7OrIR61zQYl2+RjiOOlaqUGWBieon5fe8sgmEvKowo="; }; + postPatch = '' + # https://github.com/speechbrain/HyperPyYAML/pull/33 + substituteInPlace hyperpyyaml/core.py \ + --replace-fail \ + " hparams = yaml.load(yaml_stream, Loader=loader)" \ + " if not hasattr(loader, 'max_depth'): + loader.max_depth = 0 + hparams = yaml.load(yaml_stream, Loader=loader)" + ''; + + # https://github.com/speechbrain/HyperPyYAML/pull/33 + pythonRelaxDeps = [ "ruamel.yaml" ]; + build-system = [ setuptools ]; @@ -40,8 +53,6 @@ buildPythonPackage rec { pythonImportsCheck = [ "hyperpyyaml" ]; meta = { - # https://github.com/speechbrain/HyperPyYAML/pull/32 - broken = lib.versionAtLeast ruamel-yaml.version "0.19"; description = "Extensions to YAML syntax for better python interaction"; homepage = "https://github.com/speechbrain/HyperPyYAML"; changelog = "https://github.com/speechbrain/HyperPyYAML/releases/tag/${src.tag}"; From f884062400ede84915c3ece634841919e8ac7ec3 Mon Sep 17 00:00:00 2001 From: Kirill Radzikhovskyy Date: Mon, 6 Apr 2026 08:59:50 +1000 Subject: [PATCH 2/2] python3Packages.pyannote-audio: relax torch and torchcodec version constraints --- .../python-modules/pyannote-audio/default.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pyannote-audio/default.nix b/pkgs/development/python-modules/pyannote-audio/default.nix index cd74ebb3583d..def0e82f09e4 100644 --- a/pkgs/development/python-modules/pyannote-audio/default.nix +++ b/pkgs/development/python-modules/pyannote-audio/default.nix @@ -3,6 +3,7 @@ stdenv, buildPythonPackage, fetchFromGitHub, + pythonAtLeast, # build-system hatchling, @@ -61,7 +62,9 @@ buildPythonPackage rec { ]; pythonRelaxDeps = [ + "torch" "torchaudio" + "torchcodec" ]; dependencies = [ asteroid-filterbanks @@ -121,13 +124,22 @@ buildPythonPackage rec { "test_audio_resample" ]; - disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ - # Crashes the interpreter - # - On aarch64-darwin: Trace/BPT trap: 5 - # - On x86_64-darwin: Fatal Python error: Illegal instruction - "tests/inference_test.py" - "tests/test_train.py" - ]; + disabledTestPaths = + lib.optionals stdenv.hostPlatform.isDarwin [ + # Crashes the interpreter + # - On aarch64-darwin: Trace/BPT trap: 5 + # - On x86_64-darwin: Fatal Python error: Illegal instruction + "tests/inference_test.py" + "tests/test_train.py" + ] + ++ lib.optionals (pythonAtLeast "3.14") [ + # RuntimeError: Please call `iter(combined_loader)` first. + # https://github.com/Lightning-AI/pytorch-lightning/issues/20641 + "tests/inference_test.py" + "tests/test_train.py" + # PicklingError: Can't pickle + "tests/tasks/test_reproducibility.py" + ]; meta = { description = "Neural building blocks for speaker diarization: speech activity detection, speaker change detection, overlapped speech detection, speaker embedding";