Commit 1f8a363d authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

python312Packages.torchbench: init at 0.0.31

parent 3add64b0
Loading
Loading
Loading
Loading
+58 −0
Original line number Diff line number Diff line
{
  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 −0
Original line number Diff line number Diff line
@@ -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 {