From 9e79075ad9f6533d934b9e4ae834a88f2ff39906 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 18 Oct 2024 08:21:07 +0200 Subject: [PATCH 1/4] python312Packages.submitit: init at 1.5.2 --- .../python-modules/submitit/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/submitit/default.nix diff --git a/pkgs/development/python-modules/submitit/default.nix b/pkgs/development/python-modules/submitit/default.nix new file mode 100644 index 0000000000000..eb39da57d9350 --- /dev/null +++ b/pkgs/development/python-modules/submitit/default.nix @@ -0,0 +1,62 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + cloudpickle, + flit-core, + typing-extensions, + pytestCheckHook, + pytest-asyncio, +}: + +buildPythonPackage rec { + pname = "submitit"; + version = "1.5.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "facebookincubator"; + repo = "submitit"; + rev = "refs/tags/${version}"; + hash = "sha256-PDQLzqQjoBAZM9FKsoRby26Pbh4nik3SltIHUw/xWcY="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + cloudpickle + flit-core + typing-extensions + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + ]; + + pythonImportsCheck = [ + "submitit" + ]; + + disabledTests = [ + # These tests are broken + "test_snapshot" + "test_snapshot_excludes" + "test_job_use_snapshot_cwd" + "test_job_use_snapshot_modules" + "test_nested_pickling" + "test_setup" + "test_requeuing" + ]; + + meta = { + changelog = "https://github.com/facebookincubator/submitit/releases/tag/${version}"; + description = "Python 3.8+ toolbox for submitting jobs to Slurm"; + homepage = "https://github.com/facebookincubator/submitit"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f9459619033fa..064264aa5a109 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15144,6 +15144,8 @@ self: super: with self; { subliminal = callPackage ../development/python-modules/subliminal { }; + submitit = callPackage ../development/python-modules/submitit { }; + subprocess-tee = callPackage ../development/python-modules/subprocess-tee { }; subunit = callPackage ../development/python-modules/subunit { From cf5c8c3369f01fd3365a1ec8afecd4cf1ea2a08d Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 18 Oct 2024 09:06:00 +0200 Subject: [PATCH 2/4] python312Packages.monkeytype: init at 23.3.0 --- .../python-modules/monkeytype/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/monkeytype/default.nix diff --git a/pkgs/development/python-modules/monkeytype/default.nix b/pkgs/development/python-modules/monkeytype/default.nix new file mode 100644 index 0000000000000..1f24608c8d17f --- /dev/null +++ b/pkgs/development/python-modules/monkeytype/default.nix @@ -0,0 +1,58 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + libcst, + mypy-extensions, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "monkeytype"; + version = "23.3.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "Instagram"; + repo = "MonkeyType"; + rev = "refs/tags/v${version}"; + hash = "sha256-DQ/3go53+0PQkhZcL2dX8MI/z4Iq7kTYd5EbacMNxT4="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + libcst + mypy-extensions + ]; + + pythonImportsCheck = [ + "monkeytype" + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # Disable broken tests + "test_excludes_site_packages" + "test_callee_throws_recovers" + "test_nested_callee_throws_recovers" + "test_caller_handles_callee_exception" + "test_generator_trace" + "test_return_none" + "test_access_property" + ]; + + meta = { + description = "Python library that generates static type annotations by collecting runtime types"; + homepage = "https://github.com/Instagram/MonkeyType/"; + changelog = "https://github.com/Instagram/MonkeyType/blob/${src.rev}/CHANGES.rst"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 064264aa5a109..65af3652b187a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8149,6 +8149,8 @@ self: super: with self; { monkeyhex = callPackage ../development/python-modules/monkeyhex { }; + monkeytype = callPackage ../development/python-modules/monkeytype { }; + monosat = pkgs.monosat.python { inherit buildPythonPackage; inherit (self) cython pytestCheckHook; From 3add64b034f745c18c4548eb72394d71a71c838c Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sat, 19 Oct 2024 15:26:39 +0200 Subject: [PATCH 3/4] python312Packages.sotabenchapi: init at 0.0.16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: GaƩtan Lepage <33058747+GaetanLepage@users.noreply.github.com> --- .../python-modules/sotabenchapi/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/sotabenchapi/default.nix diff --git a/pkgs/development/python-modules/sotabenchapi/default.nix b/pkgs/development/python-modules/sotabenchapi/default.nix new file mode 100644 index 0000000000000..b8a1b0b918dad --- /dev/null +++ b/pkgs/development/python-modules/sotabenchapi/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + click, + requests, + tabulate, +}: + +let + version = "0.0.16"; + pname = "sotabenchapi"; +in +buildPythonPackage { + inherit pname version; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-thbVH4aLmEgi8K17PkmbUg4nHqGj+dEiXPDILjvQMzk="; + }; + + # requirements.txt is missing in the Pypi archive and this makes the setup.py script fails + postPatch = '' + touch requirements.txt + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ + click + requests + tabulate + ]; + + pythonImportsCheck = [ + "sotabenchapi" + ]; + + # No tests + doCheck = false; + + meta = { + description = "Easily benchmark Machine Learning models on selected tasks and datasets"; + homepage = "https://pypi.org/project/sotabenchapi/"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 65af3652b187a..3b0a36a5925ed 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14649,6 +14649,8 @@ self: super: with self; { sortedcontainers = callPackage ../development/python-modules/sortedcontainers { }; + sotabenchapi = callPackage ../development/python-modules/sotabenchapi { }; + soundcard = callPackage ../development/python-modules/soundcard { }; soundcloud-v2 = callPackage ../development/python-modules/soundcloud-v2 { }; From 1f8a363d2966628423d23419b3380f3c5085526d Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Fri, 18 Oct 2024 09:06:43 +0200 Subject: [PATCH 4/4] python312Packages.torchbench: init at 0.0.31 --- .../python-modules/torchbench/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/torchbench/default.nix diff --git a/pkgs/development/python-modules/torchbench/default.nix b/pkgs/development/python-modules/torchbench/default.nix new file mode 100644 index 0000000000000..3593ae7921306 --- /dev/null +++ b/pkgs/development/python-modules/torchbench/default.nix @@ -0,0 +1,58 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + numpy, + opencv4, + sotabenchapi, + torch, + torchvision, + tqdm, +}: + +let + version = "0.0.31"; + pname = "torchbench"; +in +buildPythonPackage { + inherit pname version; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-EBZzcnRT50KREIOPrr/OZTJ4639ZUEejcelh3QSBcZ8="; + }; + + # requirements.txt is missing in the Pypi archive and this makes the setup.py script fails + postPatch = '' + touch requirements.txt + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ + numpy + opencv4 + sotabenchapi + torch + torchvision + tqdm + ]; + + pythonImportsCheck = [ + "torchbench" + ]; + + # No tests + doCheck = false; + + meta = { + description = "Easily benchmark machine learning models in PyTorch"; + homepage = "https://github.com/paperswithcode/torchbench"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ drupol ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3b0a36a5925ed..3a65e161ce417 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15778,6 +15778,8 @@ self: super: with self; { triton = self.triton-bin; }; + torchbench = callPackage ../development/python-modules/torchbench { }; + torchsnapshot = callPackage ../development/python-modules/torchsnapshot { }; torchWithCuda = self.torch.override {