python310Packages.timm: init at 0.6.12

This commit is contained in:
Ben Darwin 2023-02-01 10:59:11 -05:00
parent 03385e36c8
commit 6988903887
2 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, expecttest
, pytest-timeout
, huggingface-hub
, pyyaml
, torch
, torchvision
}:
buildPythonPackage rec {
pname = "timm";
version = "0.6.12";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "rwightman";
repo = "pytorch-image-models";
rev = "refs/tags/v${version}";
hash = "sha256-RNjCcCnNhtr5a+29Bx+k427a03MSooqvnuiDQ8cT8FA=";
};
propagatedBuildInputs = [
huggingface-hub
pyyaml
torch
torchvision
];
nativeCheckInputs = [ expecttest pytestCheckHook pytest-timeout ];
pytestFlagsArray = [ "tests" ];
# takes too long and also tries to download models:
disabledTestPaths = [ "tests/test_models.py" ];
pythonImportsCheck = [
"timm"
"timm.data"
];
meta = with lib; {
description = "PyTorch image models, scripts, and pretrained weights";
homepage = "https://huggingface.co/docs/timm/index";
changelog = "https://github.com/rwightman/pytorch-image-models/blob/v${version}/README.md#whats-new";
license = licenses.asl20;
maintainers = with maintainers; [ bcdarwin ];
};
}

View file

@ -11436,6 +11436,8 @@ self: super: with self; {
timezonefinder = callPackage ../development/python-modules/timezonefinder { }; timezonefinder = callPackage ../development/python-modules/timezonefinder { };
timm = callPackage ../development/python-modules/timm { };
tinycss2 = callPackage ../development/python-modules/tinycss2 { }; tinycss2 = callPackage ../development/python-modules/tinycss2 { };
tinycss = callPackage ../development/python-modules/tinycss { }; tinycss = callPackage ../development/python-modules/tinycss { };