Unverified Commit 2415a6c3 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python312Packages.timm: 1.0.14 -> 1.0.15 (#384498)

parents 326ac11e a9825be6
Loading
Loading
Loading
Loading
+20 −8
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,

@@ -13,22 +14,23 @@
  torch,
  torchvision,

  # checks
  # tests
  expecttest,
  pytestCheckHook,
  pytest-timeout,
  pythonAtLeast,
}:

buildPythonPackage rec {
  pname = "timm";
  version = "1.0.14";
  version = "1.0.15";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "huggingface";
    repo = "pytorch-image-models";
    tag = "v${version}";
    hash = "sha256-mQd4xsKuAKj77lG6r14iHrkaBclRmBwICXuHs7pQoGI=";
    hash = "sha256-TXc+D8GRrO46q88fOH44ZHKOGnCdP47ipEcobnGTxWU=";
  };

  build-system = [ pdm-backend ];
@@ -49,16 +51,26 @@ buildPythonPackage rec {

  pytestFlagsArray = [ "tests" ];

  disabledTests =
    lib.optionals
      (
        # RuntimeError: Dynamo is not supported on Python 3.13+
        (pythonAtLeast "3.13")

        # torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
        # CppCompileError: C++ compile error
        # OpenMP support not found.
        || stdenv.hostPlatform.isDarwin
      )
      [
        "test_kron"
      ];

  disabledTestPaths = [
    # Takes too long and also tries to download models
    "tests/test_models.py"
  ];

  disabledTests = [
    # AttributeError: 'Lookahead' object has no attribute '_optimizer_step_pre...
    "test_lookahead"
  ];

  pythonImportsCheck = [
    "timm"
    "timm.data"