Skip to main content

No project description provided

Project description

Random Access Archive

.raa files are essentially a dict header + consecutive bytes of the samples. It was made to faccilitate and accelerate deep learning training on large datasets. It's written in Rust and fast, but easily accesible programmatically in Python. Most importantly, it allows you to shuffle the data, without sacrificing too much on sequential reads, by shuffling blocks of contiguous data. It also allows for lazy sharding.

Comparison

The main advantage of this library, is how extensible it is. Other libraries like Webdataset, FFCV, Streaming Dataset, TF Record, are very batteries included, which is great for experimentation, but sacrifices on extensibility heavily since they also include data processing. Our philosiphy quite simple, you write string byte pairs, and you read string byte pairs. We only implement functionality that NEEDS to be implemented at the reader level for optimization, like shuffling and sharding.

Benchmarks:

!todo

Usage

pip install rand-archive

Writing:

from rand_archive import Writer

with Writer("test.raa") as w:
  w.write("test", bytes("test"))

Reading

from rand_archive import Reader

for _ in Reader().open_file("dummy.raa").with_shuffling():
  pass

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rand_archive-0.2.3.tar.gz (24.3 kB view hashes)

Uploaded Source

Built Distributions

rand_archive-0.2.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rand_archive-0.2.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rand_archive-0.2.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rand_archive-0.2.3-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rand_archive-0.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

rand_archive-0.2.3-cp311-none-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

rand_archive-0.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

rand_archive-0.2.3-cp311-cp311-macosx_11_0_arm64.whl (3.0 MB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

rand_archive-0.2.3-cp310-none-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

rand_archive-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

rand_archive-0.2.3-cp310-cp310-macosx_11_0_arm64.whl (3.0 MB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

rand_archive-0.2.3-cp39-none-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

rand_archive-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

rand_archive-0.2.3-cp38-none-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

rand_archive-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

rand_archive-0.2.3-cp37-none-win_amd64.whl (3.0 MB view hashes)

Uploaded CPython 3.7 Windows x86-64

rand_archive-0.2.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.0 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

rand_archive-0.2.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page