Skip to content
Merged
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
82 changes: 82 additions & 0 deletions pkgs/development/python-modules/torchtitan/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,

# build-system
setuptools,

# dependencies
datasets,
einops,
fsspec,
pillow,
tensorboard,
tokenizers,
tomli,
torch,
torchdata,
transformers,
tyro,

# tests
pytestCheckHook,
tomli-w,
writableTmpDirAsHomeHook,
}:

buildPythonPackage (finalAttrs: {
pname = "torchtitan";
version = "0.2.2";
pyproject = true;

src = fetchFromGitHub {
owner = "pytorch";
repo = "torchtitan";
tag = "v${finalAttrs.version}";
hash = "sha256-YXbbqNjmPBIFDRbvagHRIy5ph1pZmSerUxlqaF6f4cY=";
};

build-system = [
setuptools
];

dependencies = [
datasets
einops
fsspec
pillow
tensorboard
tokenizers
tomli
torch
torchdata
tyro
];

pythonImportsCheck = [ "torchtitan" ];

nativeCheckInputs = [
pytestCheckHook
tomli-w
transformers
writableTmpDirAsHomeHook
];

disabledTests = [
# Require internet access
"test_list_files"
];

disabledTestPaths = [
# Require internet access
"tests/unit_tests/test_tokenizer.py"
];

meta = {
description = "PyTorch native platform for training generative AI models";
homepage = "https://github.com/pytorch/torchtitan";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
})
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19385,6 +19385,8 @@ self: super: with self; {

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

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

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

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