torchdata


Nametorchdata JSON
Version 0.10.1 PyPI version JSON
download
home_pagehttps://github.com/pytorch/data
SummaryComposable data loading modules for PyTorch
upload_time2024-12-13 15:58:34
maintainerNone
docs_urlNone
authorPyTorch Team
requires_python>=3.9
licenseBSD
keywords
VCS
bugtrack_url
requirements urllib3 requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TorchData (see note below on current status)

[**What is TorchData?**](#what-is-torchdata) | [**Stateful DataLoader**](#stateful-dataloader) |
[**Install guide**](#installation) | [**Contributing**](#contributing) | [**License**](#license)

**:warning: June 2024 Status Update: Removing DataPipes and DataLoader V2**

**We are re-focusing the torchdata repo to be an iterative enhancement of torch.utils.data.DataLoader. We do not plan on
continuing development or maintaining the [`DataPipes`] and [`DataLoaderV2`] solutions, and they will be removed from
the torchdata repo. We'll also be revisiting the `DataPipes` references in pytorch/pytorch. In release
`torchdata==0.8.0` (July 2024) they will be marked as deprecated, and sometime after 0.9.0 (Oct 2024) they will be
deleted. Existing users are advised to pin to `torchdata==0.9.0` or an older version until they are able to migrate
away. Subsequent releases will not include DataPipes or DataLoaderV2. The old version of this README is
[available here](https://github.com/pytorch/data/blob/v0.7.1/README.md). Please reach out if you suggestions or comments
(please use [#1196](https://github.com/pytorch/data/issues/1196) for feedback).**

##

## What is TorchData?

The TorchData project is an iterative enhancement to the PyTorch torch.utils.data.DataLoader and
torch.utils.data.Dataset/IterableDataset to make them scalable, performant dataloading solutions. We will be iterating
on the enhancements under [the torchdata repo](torchdata).

Our first change begins with adding checkpointing to torch.utils.data.DataLoader, which can be found in
[stateful_dataloader, a drop-in replacement for torch.utils.data.DataLoader](torchdata/stateful_dataloader), by defining
`load_state_dict` and `state_dict` methods that enable mid-epoch checkpointing, and an API for users to track custom
iteration progress, and other custom states from the dataloader workers such as token buffers and/or RNG states.

## Stateful DataLoader

`torchdata.stateful_dataloader.StatefulDataLoader` is a drop-in replacement for torch.utils.data.DataLoader which
provides state_dict and load_state_dict functionality. See
[the Stateful DataLoader main page](torchdata/stateful_dataloader) for more information and examples. Also check out the
examples
[in this Colab notebook](https://colab.research.google.com/drive/1tonoovEd7Tsi8EW8ZHXf0v3yHJGwZP8M?usp=sharing).

## torchdata.nodes

torchdata.nodes is a library of composable iterators (not iterables!) that let you chain together common dataloading and
pre-proc operations. It follows a streaming programming model, although "sampler + Map-style" can still be configured if
you desire. See [torchdata.nodes main page](torchdata/nodes) for more details. Stay tuned for tutorial on
torchdata.nodes coming soon!

## Installation

### Version Compatibility

The following is the corresponding `torchdata` versions and supported Python versions.

| `torch`              | `torchdata`        | `python`                                |
| -------------------- | ------------------ | --------------------------------------- |
| `master` / `nightly` | `main` / `nightly` | `>=3.9`, `<=3.12` (`3.13` experimental) |
| `2.5.0`              | `0.10.0`           | `>=3.9`, `<=3.12`                       |
| `2.5.0`              | `0.9.0`            | `>=3.9`, `<=3.12`                       |
| `2.4.0`              | `0.8.0`            | `>=3.8`, `<=3.12`                       |
| `2.0.0`              | `0.6.0`            | `>=3.8`, `<=3.11`                       |
| `1.13.1`             | `0.5.1`            | `>=3.7`, `<=3.10`                       |
| `1.12.1`             | `0.4.1`            | `>=3.7`, `<=3.10`                       |
| `1.12.0`             | `0.4.0`            | `>=3.7`, `<=3.10`                       |
| `1.11.0`             | `0.3.0`            | `>=3.7`, `<=3.10`                       |

### Local pip or conda

First, set up an environment. We will be installing a PyTorch binary as well as torchdata. If you're using conda, create
a conda environment:

```bash
conda create --name torchdata
conda activate torchdata
```

If you wish to use `venv` instead:

```bash
python -m venv torchdata-env
source torchdata-env/bin/activate
```

Install torchdata:

Using pip:

```bash
pip install torchdata
```

Using conda:

```bash
conda install -c pytorch torchdata
```

### From source

```bash
pip install .
```

In case building TorchData from source fails, install the nightly version of PyTorch following the linked guide on the
[contributing page](CONTRIBUTING.md#install-pytorch-nightly).

### From nightly

The nightly version of TorchData is also provided and updated daily from main branch.

Using pip:

```bash
pip install --pre torchdata --index-url https://download.pytorch.org/whl/nightly/cpu
```

Using conda:

```bash
conda install torchdata -c pytorch-nightly
```

## Contributing

We welcome PRs! See the [CONTRIBUTING](CONTRIBUTING.md) file.

## Beta Usage and Feedback

We'd love to hear from and work with early adopters to shape our designs. Please reach out by raising an issue if you're
interested in using this tooling for your project.

## License

TorchData is BSD licensed, as found in the [LICENSE](LICENSE) file.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pytorch/data",
    "name": "torchdata",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "PyTorch Team",
    "author_email": "packages@pytorch.org",
    "download_url": null,
    "platform": null,
    "description": "# TorchData (see note below on current status)\n\n[**What is TorchData?**](#what-is-torchdata) | [**Stateful DataLoader**](#stateful-dataloader) |\n[**Install guide**](#installation) | [**Contributing**](#contributing) | [**License**](#license)\n\n**:warning: June 2024 Status Update: Removing DataPipes and DataLoader V2**\n\n**We are re-focusing the torchdata repo to be an iterative enhancement of torch.utils.data.DataLoader. We do not plan on\ncontinuing development or maintaining the [`DataPipes`] and [`DataLoaderV2`] solutions, and they will be removed from\nthe torchdata repo. We'll also be revisiting the `DataPipes` references in pytorch/pytorch. In release\n`torchdata==0.8.0` (July 2024) they will be marked as deprecated, and sometime after 0.9.0 (Oct 2024) they will be\ndeleted. Existing users are advised to pin to `torchdata==0.9.0` or an older version until they are able to migrate\naway. Subsequent releases will not include DataPipes or DataLoaderV2. The old version of this README is\n[available here](https://github.com/pytorch/data/blob/v0.7.1/README.md). Please reach out if you suggestions or comments\n(please use [#1196](https://github.com/pytorch/data/issues/1196) for feedback).**\n\n##\n\n## What is TorchData?\n\nThe TorchData project is an iterative enhancement to the PyTorch torch.utils.data.DataLoader and\ntorch.utils.data.Dataset/IterableDataset to make them scalable, performant dataloading solutions. We will be iterating\non the enhancements under [the torchdata repo](torchdata).\n\nOur first change begins with adding checkpointing to torch.utils.data.DataLoader, which can be found in\n[stateful_dataloader, a drop-in replacement for torch.utils.data.DataLoader](torchdata/stateful_dataloader), by defining\n`load_state_dict` and `state_dict` methods that enable mid-epoch checkpointing, and an API for users to track custom\niteration progress, and other custom states from the dataloader workers such as token buffers and/or RNG states.\n\n## Stateful DataLoader\n\n`torchdata.stateful_dataloader.StatefulDataLoader` is a drop-in replacement for torch.utils.data.DataLoader which\nprovides state_dict and load_state_dict functionality. See\n[the Stateful DataLoader main page](torchdata/stateful_dataloader) for more information and examples. Also check out the\nexamples\n[in this Colab notebook](https://colab.research.google.com/drive/1tonoovEd7Tsi8EW8ZHXf0v3yHJGwZP8M?usp=sharing).\n\n## torchdata.nodes\n\ntorchdata.nodes is a library of composable iterators (not iterables!) that let you chain together common dataloading and\npre-proc operations. It follows a streaming programming model, although \"sampler + Map-style\" can still be configured if\nyou desire. See [torchdata.nodes main page](torchdata/nodes) for more details. Stay tuned for tutorial on\ntorchdata.nodes coming soon!\n\n## Installation\n\n### Version Compatibility\n\nThe following is the corresponding `torchdata` versions and supported Python versions.\n\n| `torch`              | `torchdata`        | `python`                                |\n| -------------------- | ------------------ | --------------------------------------- |\n| `master` / `nightly` | `main` / `nightly` | `>=3.9`, `<=3.12` (`3.13` experimental) |\n| `2.5.0`              | `0.10.0`           | `>=3.9`, `<=3.12`                       |\n| `2.5.0`              | `0.9.0`            | `>=3.9`, `<=3.12`                       |\n| `2.4.0`              | `0.8.0`            | `>=3.8`, `<=3.12`                       |\n| `2.0.0`              | `0.6.0`            | `>=3.8`, `<=3.11`                       |\n| `1.13.1`             | `0.5.1`            | `>=3.7`, `<=3.10`                       |\n| `1.12.1`             | `0.4.1`            | `>=3.7`, `<=3.10`                       |\n| `1.12.0`             | `0.4.0`            | `>=3.7`, `<=3.10`                       |\n| `1.11.0`             | `0.3.0`            | `>=3.7`, `<=3.10`                       |\n\n### Local pip or conda\n\nFirst, set up an environment. We will be installing a PyTorch binary as well as torchdata. If you're using conda, create\na conda environment:\n\n```bash\nconda create --name torchdata\nconda activate torchdata\n```\n\nIf you wish to use `venv` instead:\n\n```bash\npython -m venv torchdata-env\nsource torchdata-env/bin/activate\n```\n\nInstall torchdata:\n\nUsing pip:\n\n```bash\npip install torchdata\n```\n\nUsing conda:\n\n```bash\nconda install -c pytorch torchdata\n```\n\n### From source\n\n```bash\npip install .\n```\n\nIn case building TorchData from source fails, install the nightly version of PyTorch following the linked guide on the\n[contributing page](CONTRIBUTING.md#install-pytorch-nightly).\n\n### From nightly\n\nThe nightly version of TorchData is also provided and updated daily from main branch.\n\nUsing pip:\n\n```bash\npip install --pre torchdata --index-url https://download.pytorch.org/whl/nightly/cpu\n```\n\nUsing conda:\n\n```bash\nconda install torchdata -c pytorch-nightly\n```\n\n## Contributing\n\nWe welcome PRs! See the [CONTRIBUTING](CONTRIBUTING.md) file.\n\n## Beta Usage and Feedback\n\nWe'd love to hear from and work with early adopters to shape our designs. Please reach out by raising an issue if you're\ninterested in using this tooling for your project.\n\n## License\n\nTorchData is BSD licensed, as found in the [LICENSE](LICENSE) file.\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Composable data loading modules for PyTorch",
    "version": "0.10.1",
    "project_urls": {
        "Homepage": "https://github.com/pytorch/data"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cab49d1c717e23fa238ec9ec39de728f120bd92561490c9b6ab26394d431ab26",
                "md5": "dae30f31020a1744dd6e1a2fe862d4bb",
                "sha256": "30bfb8300d0e4bf406d72930e453e2995ed5e31afce06fa335518ae070da5dab"
            },
            "downloads": -1,
            "filename": "torchdata-0.10.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dae30f31020a1744dd6e1a2fe862d4bb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 57479,
            "upload_time": "2024-12-13T15:58:34",
            "upload_time_iso_8601": "2024-12-13T15:58:34.271815Z",
            "url": "https://files.pythonhosted.org/packages/ca/b4/9d1c717e23fa238ec9ec39de728f120bd92561490c9b6ab26394d431ab26/torchdata-0.10.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-13 15:58:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pytorch",
    "github_project": "data",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "urllib3",
            "specs": [
                [
                    ">=",
                    "1.25"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": []
        }
    ],
    "lcname": "torchdata"
}
        
Elapsed time: 0.39798s