From 36189f936ac527e6806b4de907b97ec19e721b5a Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 8 Apr 2026 08:00:16 +0000 Subject: [PATCH 1/2] python3Packages.peft: cleanup, fix on aarch64-linux --- .../python-modules/peft/default.nix | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/peft/default.nix b/pkgs/development/python-modules/peft/default.nix index aed1b99d3112..214cc3a0a902 100644 --- a/pkgs/development/python-modules/peft/default.nix +++ b/pkgs/development/python-modules/peft/default.nix @@ -29,7 +29,7 @@ scipy, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "peft"; version = "0.18.1"; pyproject = true; @@ -37,7 +37,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "huggingface"; repo = "peft"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-qlM8yEN/CJZbSAGNCltS4JQSzstVXRVqu47qZbLPVNc="; }; @@ -70,12 +70,20 @@ buildPythonPackage rec { enabledTestPaths = [ "tests" ]; - # These tests fail when MPS devices are detected - disabledTests = lib.optional stdenv.hostPlatform.isDarwin [ - "gpu" - "test_save_load" - "test_resume_training_model_with_topk_weights" - ]; + disabledTests = + lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ + # RuntimeError: Failed to initialize cpuinfo! + "test_randlora_dtypes" + "test_shira_dtypes" + "test_vblora_dtypes" + "test_vera_dtypes" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # These tests fail when MPS devices are detected + "gpu" + "test_save_load" + "test_resume_training_model_with_topk_weights" + ]; disabledTestPaths = [ # ValueError: Can't find 'adapter_config.json' @@ -113,8 +121,8 @@ buildPythonPackage rec { meta = { homepage = "https://github.com/huggingface/peft"; description = "State-of-the art parameter-efficient fine tuning"; - changelog = "https://github.com/huggingface/peft/releases/tag/${src.tag}"; + changelog = "https://github.com/huggingface/peft/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ bcdarwin ]; }; -} +}) From f81cee4d94d491578858597c1621722649d703f1 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 8 Apr 2026 11:06:11 +0000 Subject: [PATCH 2/2] python3Packages.tinygrad: skip failing tests on aarch64-linux --- pkgs/development/python-modules/tinygrad/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/tinygrad/default.nix b/pkgs/development/python-modules/tinygrad/default.nix index 556db2a11b83..e6f805449778 100644 --- a/pkgs/development/python-modules/tinygrad/default.nix +++ b/pkgs/development/python-modules/tinygrad/default.nix @@ -247,6 +247,12 @@ buildPythonPackage (finalAttrs: { "test_float_cast_to_unsigned_underflow" "test_int8" "test_int8_to_uint16_negative" + + # RuntimeError: Failed to initialize cpuinfo! + "test_conv2d_fused_half" + "test_conv2d_half" + "test_gemm_fp16" + "test_softmax_dtype" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # Flaky (pass when running a smaller set of tests: tests/unit/*, but not within the full test suite)