From 68c0efab60b7af823aec925feabe55fd079891e7 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 3 Sep 2024 00:15:55 +0200 Subject: [PATCH 1/3] python312Packages: clean + mark as broken for python >= 3.12 --- .../python-modules/rising/default.nix | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/rising/default.nix b/pkgs/development/python-modules/rising/default.nix index fee5c590de512..2c96fbf92edaa 100644 --- a/pkgs/development/python-modules/rising/default.nix +++ b/pkgs/development/python-modules/rising/default.nix @@ -1,45 +1,51 @@ { - stdenv, lib, buildPythonPackage, - pythonOlder, fetchFromGitHub, - pytestCheckHook, - dill, + + # dependencies lightning-utilities, numpy, torch, threadpoolctl, tqdm, + + # tests + dill, + pytestCheckHook, + + stdenv, + + pythonAtLeast, }: buildPythonPackage rec { pname = "rising"; version = "0.3.0"; - format = "setuptools"; - disabled = pythonOlder "3.8"; + pyproject = true; src = fetchFromGitHub { owner = "PhoenixDL"; - repo = pname; + repo = "rising"; rev = "refs/tags/v${version}"; hash = "sha256-sBzVTst5Tp2oZZ+Xsg3M7uAMbucL6idlpYwHvib3EaY="; }; - pythonRelaxDeps = [ "lightning-utilities" ]; - propagatedBuildInputs = [ + dependencies = [ lightning-utilities numpy torch threadpoolctl tqdm ]; + nativeCheckInputs = [ dill pytestCheckHook ]; + disabledTests = lib.optionals (stdenv.isLinux && stdenv.isAarch64) [ # RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly: "test_progressive_resize_integration" @@ -60,5 +66,7 @@ buildPythonPackage rec { homepage = "https://rising.rtfd.io"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ bcdarwin ]; + # AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'? + broken = pythonAtLeast "3.12"; }; } From 4c672880636506ea1b9eaf2fd56e7bf3bd71faaf Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 2 Sep 2024 23:09:24 +0200 Subject: [PATCH 2/3] python312Packages.lightning-utilities: 0.11.6 -> 0.11.7 Diff: https://github.com/Lightning-AI/utilities/compare/refs/tags/v0.11.6...v0.11.7 Changelog: https://github.com/Lightning-AI/utilities/releases/tag/v0.11.7 --- .../python-modules/lightning-utilities/default.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/lightning-utilities/default.nix b/pkgs/development/python-modules/lightning-utilities/default.nix index 393a965535e71..4d437ac67c54f 100644 --- a/pkgs/development/python-modules/lightning-utilities/default.nix +++ b/pkgs/development/python-modules/lightning-utilities/default.nix @@ -19,16 +19,14 @@ buildPythonPackage rec { pname = "lightning-utilities"; - version = "0.11.6"; + version = "0.11.7"; pyproject = true; - disabled = pythonOlder "3.8"; - src = fetchFromGitHub { owner = "Lightning-AI"; repo = "utilities"; rev = "refs/tags/v${version}"; - hash = "sha256-Bw28mLz9GaMucqP+EqR1F3OKLxDJiIVacrCBIV35G/I="; + hash = "sha256-0XxBDe9OGQLfl4viuUm5Hx8WvZhSj+J0FoDqD/JOiZM="; }; postPatch = '' From 8774cf06ab8ee257cb892b49f923d261b61399da Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 2 Sep 2024 23:59:55 +0200 Subject: [PATCH 3/3] python311Packages.finetuning-scheduler: skip failing tests --- .../finetuning-scheduler/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/finetuning-scheduler/default.nix b/pkgs/development/python-modules/finetuning-scheduler/default.nix index 0ff7318f0bb3d..7d9cf816c7ba5 100644 --- a/pkgs/development/python-modules/finetuning-scheduler/default.nix +++ b/pkgs/development/python-modules/finetuning-scheduler/default.nix @@ -36,10 +36,18 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook ]; pytestFlagsArray = [ "tests" ]; - disabledTests = lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [ - # slightly exceeds numerical tolerance on aarch64-linux: - "test_fts_frozen_bn_track_running_stats" - ]; + disabledTests = + # torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised: + # LoweringException: ImportError: cannot import name 'triton_key' from 'triton.compiler.compiler' + lib.optionals (pythonOlder "3.12") [ + "test_fts_dynamo_enforce_p0" + "test_fts_dynamo_resume" + "test_fts_dynamo_intrafit" + ] + ++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [ + # slightly exceeds numerical tolerance on aarch64-linux: + "test_fts_frozen_bn_track_running_stats" + ]; pythonImportsCheck = [ "finetuning_scheduler" ];