Commit db5ba327 authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files
parent c29ec3d5
Loading
Loading
Loading
Loading
+17 −15
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  pythonOlder,
  fetchFromGitHub,

  # build-system
  setuptools,
  torch,
  which,

  # dependencies
  cloudpickle,
  numpy,
  orjson,
  packaging,

  # checks
  h5py,
@@ -23,28 +22,26 @@

buildPythonPackage rec {
  pname = "tensordict";
  version = "0.6.2";
  version = "0.7.0";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "pytorch";
    repo = "tensordict";
    tag = "v${version}";
    hash = "sha256-dsbpk0O5Gs5WUfi3ENqHdpy4rWoBjm1i44+ycp0jDJ0=";
    hash = "sha256-KbCNBFewMx4kaWMoV+zREj6XTZiwmR4/I3zpf55wuOQ=";
  };

  build-system = [
    setuptools
    torch
    which
  ];

  dependencies = [
    cloudpickle
    numpy
    orjson
    packaging
    torch
  ];

@@ -62,6 +59,10 @@ buildPythonPackage rec {

  disabledTests =
    [
      # FileNotFoundError: [Errno 2] No such file or directory: '/build/source/tensordict/tensorclass.pyi
      "test_tensorclass_instance_methods"
      "test_tensorclass_stub_methods"

      # Hangs forever
      "test_copy_onto"

@@ -86,11 +87,12 @@ buildPythonPackage rec {
      "test_isend"
    ];

  disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
    # torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
    # OpenMP support not found.
  disabledTestPaths =
    [
      # torch._dynamo.exc.Unsupported: Graph break due to unsupported builtin None.ReferenceType.__new__.
      "test/test_compile.py"

    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      # ModuleNotFoundError: No module named 'torch._C._distributed_c10d'; 'torch._C' is not a package
      "test/test_distributed.py"
    ];