Gaetan Lepage
2025-10-20 21:25:24 +00:00
parent 7d19100fc0
commit af1e9608fe
@@ -3,7 +3,6 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
# build-system
setuptools,
@@ -13,35 +12,21 @@
torch,
# tests
pythonOlder,
pythonAtLeast,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "finetuning-scheduler";
version = "2.5.3";
version = "2.9.0";
pyproject = true;
src = fetchFromGitHub {
owner = "speediedan";
repo = "finetuning-scheduler";
tag = "v${version}";
hash = "sha256-6WRKDYug7eVaTSY2R2jBcj9o/984mqKZZi36XRT7KyI=";
hash = "sha256-xKaOVbsflqQI9e1Ezcgea2hZpLh6CY+vx2Jy7QPswHM=";
};
patches = [
(fetchpatch {
url = "https://github.com/speediedan/finetuning-scheduler/commit/78e6e225f353d1ba95db05d7fc6ff541859ed6a2.patch";
hash = "sha256-7mbtsaHrnHph8lvuwhBGqxPQimbZcbGeyBYXzApFPn4=";
})
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "setuptools<77.0.0" "setuptools"
'';
build-system = [ setuptools ];
pythonRelaxDeps = [
@@ -58,23 +43,14 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ];
enabledTestPaths = [ "tests" ];
disabledTests =
lib.optionals (pythonOlder "3.12") [
# torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
# LoweringException: ImportError: cannot import name 'triton_key' from 'triton.compiler.compiler'
"test_fts_dynamo_enforce_p0"
"test_fts_dynamo_resume"
"test_fts_dynamo_intrafit"
]
++ lib.optionals (pythonAtLeast "3.13") [
# RuntimeError: Dynamo is not supported on Python 3.13+
"test_fts_dynamo_enforce_p0"
"test_fts_dynamo_resume"
]
++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [
# slightly exceeds numerical tolerance on aarch64-linux:
"test_fts_frozen_bn_track_running_stats"
];
disabledTests = [
# AssertionError: assert 'lightning @ git+' in 'lightning>=2.5.0,<2.5.6'
"test_get_lightning_requirement"
]
++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [
# slightly exceeds numerical tolerance on aarch64-linux:
"test_fts_frozen_bn_track_running_stats"
];
pythonImportsCheck = [ "finetuning_scheduler" ];