Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions pkgs/development/python-modules/torchdata/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{ lib
, buildPythonPackage
, fetchFromGitHub

# Propogated build inputs
, pytorch
, requests

# Check inputs
Comment on lines +4 to +9

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Propogated build inputs
, pytorch
, requests
# Check inputs
, pytorch
, requests

, pytestCheckHook
, expecttest
, fsspec
, numpy
, rarfile
, torchaudio
, torchtext
# , iopath

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# , iopath

}:


buildPythonPackage rec {
pname = "torchdata";
version = "0.3.0a1-e86cedc";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use the unstable format


src = fetchFromGitHub {
owner = "pytorch";
repo = "data";
# rev = "v${version}";
rev = "e86cedc5ffd024ea293f541fc77e8a3b4856c8c9"; # git branch release/0.3.0
Comment on lines +28 to +29

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be changed back?

sha256 = "sha256:06gk7pqk2dbkxmaskycvvwyzhapbl5dr2r1v2vswdi6yx5iqzcwa";
};

propagatedBuildInputs = [
pytorch # FIXME: relies on an unstable version of pytorch for now
requests
];

checkInputs = [
pytestCheckHook
expecttest
fsspec
numpy
rarfile
torchaudio
torchtext
# iopath

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# iopath

];

disabledTests = [
# Tests that require network access
"test_gdrive_iterdatapipe"
"test_online_iterdatapipe"
"test_http_reader_iterdatapipe"
"test_on_disk_cache_holder_iterdatapipe"
];

disabledTestPaths = [
# FIXME: This test relies on a newer (unstable) version of torchtext
"test/test_text_examples.py"
];

pythonImportsCheck = [ "torchdata" ];

meta = with lib; {
description = "A PyTorch repo for data loading and utilities to be shared by the PyTorch domain libraries.";
homepage = "github.com/pytorch/data";
license = licenses.bsd3;
maintainers = with maintainers; [ ];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be set

};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9911,6 +9911,8 @@ in {

torchaudio-bin = callPackage ../development/python-modules/torchaudio/bin.nix { };

torchdata = callPackage ../development/python-modules/torchdata { };

torchgpipe = callPackage ../development/python-modules/torchgpipe { };

torchinfo = callPackage ../development/python-modules/torchinfo { };
Expand Down