Skip to content

Commit 1f8a363

Browse files
committed
python312Packages.torchbench: init at 0.0.31
1 parent 3add64b commit 1f8a363

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-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+
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15778,6 +15778,8 @@ self: super: with self; {
1577815778
triton = self.triton-bin;
1577915779
};
1578015780

15781+
torchbench = callPackage ../development/python-modules/torchbench { };
15782+
1578115783
torchsnapshot = callPackage ../development/python-modules/torchsnapshot { };
1578215784

1578315785
torchWithCuda = self.torch.override {

0 commit comments

Comments
 (0)