pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / python-modules / timm / default.nix
bloba85434931992a5da30cdfeac215814fb501b4632
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   pdm-backend,
9   # dependencies
10   huggingface-hub,
11   pyyaml,
12   safetensors,
13   torch,
14   torchvision,
16   # checks
17   expecttest,
18   pytestCheckHook,
19   pytest-timeout,
22 buildPythonPackage rec {
23   pname = "timm";
24   version = "1.0.11";
25   pyproject = true;
27   src = fetchFromGitHub {
28     owner = "huggingface";
29     repo = "pytorch-image-models";
30     rev = "refs/tags/v${version}";
31     hash = "sha256-+e4+k1Oyxf94rLsOTWfMl5YWTteXgSoecvbyxL348kg=";
32   };
34   build-system = [ pdm-backend ];
36   dependencies = [
37     huggingface-hub
38     pyyaml
39     safetensors
40     torch
41     torchvision
42   ];
44   nativeCheckInputs = [
45     expecttest
46     pytestCheckHook
47     pytest-timeout
48   ];
50   pytestFlagsArray = [ "tests" ];
52   disabledTestPaths = [
53     # Takes too long and also tries to download models
54     "tests/test_models.py"
55   ];
57   disabledTests = [
58     # AttributeError: 'Lookahead' object has no attribute '_optimizer_step_pre...
59     "test_lookahead"
60   ];
62   pythonImportsCheck = [
63     "timm"
64     "timm.data"
65   ];
67   meta = {
68     description = "PyTorch image models, scripts, and pretrained weights";
69     homepage = "https://huggingface.co/docs/timm/index";
70     changelog = "https://github.com/huggingface/pytorch-image-models/blob/v${version}/README.md#whats-new";
71     license = lib.licenses.asl20;
72     maintainers = with lib.maintainers; [ bcdarwin ];
73   };