Unverified Commit 3793149a authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

python312Packages.tensordict: 0.6.2 -> 0.7.0; python312Packages.torchrl: 0.6.0 -> 0.7.0 (#350282)

parents cab8acc5 aa82fd94
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"
    ];
+5 −2
Original line number Diff line number Diff line
@@ -48,14 +48,14 @@

buildPythonPackage rec {
  pname = "torchrl";
  version = "0.6.0";
  version = "0.7.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "pytorch";
    repo = "rl";
    tag = "v${version}";
    hash = "sha256-2jxvxhhKZQVy1aU0G9PE8nPlg8yp+/+EUACkLNLRpMQ=";
    hash = "sha256-SMVm1XfHHqSkWTDVSqqO3kIxMBgV9A+XrEpJ56AyaBE=";
  };

  build-system = [
@@ -186,5 +186,8 @@ buildPythonPackage rec {
    changelog = "https://github.com/pytorch/rl/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ GaetanLepage ];
    # torhcrl is not compatible with our current version of gymnasium (>=1.0)
    # https://github.com/pytorch/rl/pull/2473
    broken = true;
  };
}