Skip to content

Commit d5627df

Browse files
authored
python312Packages.torchbench: 0.0.31 (#349472)
2 parents f8f1811 + 1f8a363 commit d5627df

File tree

5 files changed

+238
-0
lines changed

5 files changed

+238
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
setuptools,
6+
libcst,
7+
mypy-extensions,
8+
pytestCheckHook,
9+
}:
10+
11+
buildPythonPackage rec {
12+
pname = "monkeytype";
13+
version = "23.3.0";
14+
pyproject = true;
15+
16+
src = fetchFromGitHub {
17+
owner = "Instagram";
18+
repo = "MonkeyType";
19+
rev = "refs/tags/v${version}";
20+
hash = "sha256-DQ/3go53+0PQkhZcL2dX8MI/z4Iq7kTYd5EbacMNxT4=";
21+
};
22+
23+
build-system = [
24+
setuptools
25+
];
26+
27+
dependencies = [
28+
libcst
29+
mypy-extensions
30+
];
31+
32+
pythonImportsCheck = [
33+
"monkeytype"
34+
];
35+
36+
nativeCheckInputs = [
37+
pytestCheckHook
38+
];
39+
40+
disabledTests = [
41+
# Disable broken tests
42+
"test_excludes_site_packages"
43+
"test_callee_throws_recovers"
44+
"test_nested_callee_throws_recovers"
45+
"test_caller_handles_callee_exception"
46+
"test_generator_trace"
47+
"test_return_none"
48+
"test_access_property"
49+
];
50+
51+
meta = {
52+
description = "Python library that generates static type annotations by collecting runtime types";
53+
homepage = "https://github.com/Instagram/MonkeyType/";
54+
changelog = "https://github.com/Instagram/MonkeyType/blob/${src.rev}/CHANGES.rst";
55+
license = lib.licenses.bsd3;
56+
maintainers = with lib.maintainers; [ drupol ];
57+
};
58+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchPypi,
5+
setuptools,
6+
click,
7+
requests,
8+
tabulate,
9+
}:
10+
11+
let
12+
version = "0.0.16";
13+
pname = "sotabenchapi";
14+
in
15+
buildPythonPackage {
16+
inherit pname version;
17+
pyproject = true;
18+
19+
src = fetchPypi {
20+
inherit pname version;
21+
hash = "sha256-thbVH4aLmEgi8K17PkmbUg4nHqGj+dEiXPDILjvQMzk=";
22+
};
23+
24+
# requirements.txt is missing in the Pypi archive and this makes the setup.py script fails
25+
postPatch = ''
26+
touch requirements.txt
27+
'';
28+
29+
build-system = [
30+
setuptools
31+
];
32+
33+
dependencies = [
34+
click
35+
requests
36+
tabulate
37+
];
38+
39+
pythonImportsCheck = [
40+
"sotabenchapi"
41+
];
42+
43+
# No tests
44+
doCheck = false;
45+
46+
meta = {
47+
description = "Easily benchmark Machine Learning models on selected tasks and datasets";
48+
homepage = "https://pypi.org/project/sotabenchapi/";
49+
license = lib.licenses.asl20;
50+
maintainers = with lib.maintainers; [ drupol ];
51+
};
52+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
setuptools,
6+
cloudpickle,
7+
flit-core,
8+
typing-extensions,
9+
pytestCheckHook,
10+
pytest-asyncio,
11+
}:
12+
13+
buildPythonPackage rec {
14+
pname = "submitit";
15+
version = "1.5.2";
16+
pyproject = true;
17+
18+
src = fetchFromGitHub {
19+
owner = "facebookincubator";
20+
repo = "submitit";
21+
rev = "refs/tags/${version}";
22+
hash = "sha256-PDQLzqQjoBAZM9FKsoRby26Pbh4nik3SltIHUw/xWcY=";
23+
};
24+
25+
build-system = [
26+
setuptools
27+
];
28+
29+
dependencies = [
30+
cloudpickle
31+
flit-core
32+
typing-extensions
33+
];
34+
35+
nativeCheckInputs = [
36+
pytestCheckHook
37+
pytest-asyncio
38+
];
39+
40+
pythonImportsCheck = [
41+
"submitit"
42+
];
43+
44+
disabledTests = [
45+
# These tests are broken
46+
"test_snapshot"
47+
"test_snapshot_excludes"
48+
"test_job_use_snapshot_cwd"
49+
"test_job_use_snapshot_modules"
50+
"test_nested_pickling"
51+
"test_setup"
52+
"test_requeuing"
53+
];
54+
55+
meta = {
56+
changelog = "https://github.com/facebookincubator/submitit/releases/tag/${version}";
57+
description = "Python 3.8+ toolbox for submitting jobs to Slurm";
58+
homepage = "https://github.com/facebookincubator/submitit";
59+
license = lib.licenses.mit;
60+
maintainers = with lib.maintainers; [ drupol ];
61+
};
62+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchPypi,
5+
setuptools,
6+
numpy,
7+
opencv4,
8+
sotabenchapi,
9+
torch,
10+
torchvision,
11+
tqdm,
12+
}:
13+
14+
let
15+
version = "0.0.31";
16+
pname = "torchbench";
17+
in
18+
buildPythonPackage {
19+
inherit pname version;
20+
pyproject = true;
21+
22+
src = fetchPypi {
23+
inherit pname version;
24+
hash = "sha256-EBZzcnRT50KREIOPrr/OZTJ4639ZUEejcelh3QSBcZ8=";
25+
};
26+
27+
# requirements.txt is missing in the Pypi archive and this makes the setup.py script fails
28+
postPatch = ''
29+
touch requirements.txt
30+
'';
31+
32+
build-system = [
33+
setuptools
34+
];
35+
36+
dependencies = [
37+
numpy
38+
opencv4
39+
sotabenchapi
40+
torch
41+
torchvision
42+
tqdm
43+
];
44+
45+
pythonImportsCheck = [
46+
"torchbench"
47+
];
48+
49+
# No tests
50+
doCheck = false;
51+
52+
meta = {
53+
description = "Easily benchmark machine learning models in PyTorch";
54+
homepage = "https://github.com/paperswithcode/torchbench";
55+
license = lib.licenses.asl20;
56+
maintainers = with lib.maintainers; [ drupol ];
57+
};
58+
}

pkgs/top-level/python-packages.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8151,6 +8151,8 @@ self: super: with self; {
81518151

81528152
monkeyhex = callPackage ../development/python-modules/monkeyhex { };
81538153

8154+
monkeytype = callPackage ../development/python-modules/monkeytype { };
8155+
81548156
monosat = pkgs.monosat.python {
81558157
inherit buildPythonPackage;
81568158
inherit (self) cython pytestCheckHook;
@@ -14649,6 +14651,8 @@ self: super: with self; {
1464914651

1465014652
sortedcontainers = callPackage ../development/python-modules/sortedcontainers { };
1465114653

14654+
sotabenchapi = callPackage ../development/python-modules/sotabenchapi { };
14655+
1465214656
soundcard = callPackage ../development/python-modules/soundcard { };
1465314657

1465414658
soundcloud-v2 = callPackage ../development/python-modules/soundcloud-v2 { };
@@ -15146,6 +15150,8 @@ self: super: with self; {
1514615150

1514715151
subliminal = callPackage ../development/python-modules/subliminal { };
1514815152

15153+
submitit = callPackage ../development/python-modules/submitit { };
15154+
1514915155
subprocess-tee = callPackage ../development/python-modules/subprocess-tee { };
1515015156

1515115157
subunit = callPackage ../development/python-modules/subunit {
@@ -15774,6 +15780,8 @@ self: super: with self; {
1577415780
triton = self.triton-bin;
1577515781
};
1577615782

15783+
torchbench = callPackage ../development/python-modules/torchbench { };
15784+
1577715785
torchsnapshot = callPackage ../development/python-modules/torchsnapshot { };
1577815786

1577915787
torchWithCuda = self.torch.override {

0 commit comments

Comments
 (0)