python312Packages.torchsnapshot: skip failing test and enable on python 3.12

This commit is contained in:
Gaetan Lepage
2024-12-04 18:06:49 +01:00
parent 2f9d395f05
commit ad02718eab
@@ -1,10 +1,12 @@
{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
# build-system
setuptools,
wheel,
# dependencies
aiofiles,
aiohttp,
importlib-metadata,
@@ -13,10 +15,10 @@
pyyaml,
torch,
typing-extensions,
# tests
pytest-asyncio,
pytestCheckHook,
pythonAtLeast,
stdenv,
}:
buildPythonPackage rec {
@@ -24,8 +26,6 @@ buildPythonPackage rec {
version = "0.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "pytorch";
repo = "torchsnapshot";
@@ -35,7 +35,6 @@ buildPythonPackage rec {
build-system = [
setuptools
wheel
];
dependencies = [
@@ -56,16 +55,21 @@ buildPythonPackage rec {
pytestCheckHook
];
meta = with lib; {
disabledTests = [
# torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
# AssertionError: "Socket Timeout" does not match "wait timeout after 5000ms
"test_linear_barrier_timeout"
];
meta = {
description = "Performant, memory-efficient checkpointing library for PyTorch applications, designed with large, complex distributed workloads in mind";
homepage = "https://github.com/pytorch/torchsnapshot/";
changelog = "https://github.com/pytorch/torchsnapshot/releases/tag/${version}";
license = licenses.bsd3;
maintainers = with maintainers; [ GaetanLepage ];
broken =
# https://github.com/pytorch/torchsnapshot/issues/175
pythonAtLeast "3.12"
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ GaetanLepage ];
badPlatforms = [
# ModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package
|| stdenv.hostPlatform.isDarwin;
lib.systems.inspect.patterns.isDarwin
];
};
}