Skip to content

Commit

Permalink
python312Packages.torchbench: init at 0.0.31
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Oct 20, 2024
1 parent 3add64b commit 1f8a363
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
58 changes: 58 additions & 0 deletions pkgs/development/python-modules/torchbench/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1f8a363

Please sign in to comment.