Skip to main content

Test DeepSource

WebDataset

WebDataset is a PyTorch Dataset (IterableDataset) implementation providing efficient access to datasets stored in POSIX tar archives and uses only sequential/streaming data access. This brings substantial performance advantage in many compute environments, and it is essential for very large scale training.

While WebDataset scales to very large problems, it also works well with smaller datasets and simplifies creation, management, and distribution of training data for deep learning.

WebDataset implements standard PyTorch IterableDataset interface and works with the PyTorch DataLoader. Access to datasets is as simple as:

import webdataset as wds

dataset = wds.WebDataset(url).shuffle(1000).decode("torchrgb").to_tuple("jpg;png", "json")
dataloader = torch.utils.data.DataLoader(dataset, num_workers=4, batch_size=16)

for inputs, outputs in dataloader:
    ...

In that code snippet, url can refer to a local file, a local HTTP server, a cloud storage object, an object on an object store, or even the output of arbitrary command pipelines.

WebDataset fulfills a similar function to Tensorflow's TFRecord/tf.Example classes, but it is much easier to adopt because it does not actually require any kind of data conversion: data is stored in exactly the same format inside tar files as it is on disk, and all preprocessing and data augmentation code remains unchanged.

Documentation

Installation

$ pip install webdataset

For the Github version:

$ pip install git+https://github.com/tmbdev/webdataset.git

Documentation: ReadTheDocs

Introductory Videos

Here are some videos talking about WebDataset and large scale deep learning:

More Examples

Related Libraries and Software

The AIStore server provides an efficient backend for WebDataset; it functions like a combination of web server, content distribution network, P2P network, and distributed file system. Together, AIStore and WebDataset can serve input data from rotational drives distributed across many servers at the speed of local SSDs to many GPUs, at a fraction of the cost. We can easily achieve hundreds of MBytes/s of I/O per GPU even in large, distributed training jobs.

The tarproc utilities provide command line manipulation and processing of webdatasets and other tar files, including splitting, concatenation, and xargs-like functionality.

The tensorcom library provides fast three-tiered I/O; it can be inserted between AIStore and WebDataset to permit distributed data augmentation and I/O. It is particularly useful when data augmentation requires more CPU than the GPU server has available.

You can find the full PyTorch ImageNet sample code converted to WebDataset at tmbdev/pytorch-imagenet-wds

Release files for webdataset 0.1.59

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webdataset 0.1.59
File Size Uploaded
webdataset-0.1.59.tar.gz 26.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for webdataset 0.1.59
File Interpreter ABI Platform
webdataset-0.1.59-py3-none-any.whl Python 3 none any Details

Total release size: 57.3 kB

Release files / webdataset-0.1.59.tar.gz

Download URL webdataset-0.1.59.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9e280a3dd1274b65d24b2967d6ec8fb7d23ed5b969c6be560877620569a0744c
BLAKE2b-256 checksum
How to use checksums
843ebc625a00a4426d9f81fa85f646f5f4f8f4196306dd050adfcabe58b0c785
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release files / webdataset-0.1.59-py3-none-any.whl

Download URL webdataset-0.1.59-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edd243c55eebce7d750280a6483b72d0f2682a71a5fcfd298ec1a92844207a50
BLAKE2b-256 checksum
How to use checksums
000772448ef4918f68b0421cab4dcdd0909a5ac8a12f6e9e328e6466b0dd3544
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Release history Release notifications | RSS feed

1.0.2

2 release files

0.2.96

2 release files

0.2.79

2 release files

0.2.77

2 release files

0.2.72

2 release files

0.2.71

2 release files

0.2.69

2 release files

0.2.68

2 release files

0.2.65

2 release files

0.2.62

2 release files

0.2.60

2 release files

0.2.59

2 release files

0.2.57

2 release files

0.2.48

2 release files

0.2.43

2 release files

0.2.33

2 release files

0.2.31

2 release files

0.2.26

2 release files

0.2.25

2 release files

0.2.21

2 release files

0.2.20

2 release files

0.2.18

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.1.96

2 release files

0.1.87

2 release files

0.1.86

2 release files

0.1.85

2 release files

0.1.84

2 release files

0.1.73

2 release files

0.1.61

2 release files

This release

0.1.59 This release

2 release files

0.1.58

2 release files

0.1.54

2 release files

0.1.49

2 release files

0.1.48

2 release files

0.1.40

2 release files

0.1.37

2 release files

0.1.34

2 release files

0.1.33

2 release files

0.1.25

2 release files

0.1.24

2 release files

0.1.23

2 release files

0.1.22

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page