dataio-rs 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. dataio_rs-0.2.1/.cargo/config.toml +2 -0
  2. dataio_rs-0.2.1/.github/workflows/ci.yml +106 -0
  3. dataio_rs-0.2.1/.gitignore +12 -0
  4. dataio_rs-0.2.1/Cargo.lock +4886 -0
  5. dataio_rs-0.2.1/Cargo.toml +103 -0
  6. dataio_rs-0.2.1/PKG-INFO +158 -0
  7. dataio_rs-0.2.1/README.md +141 -0
  8. dataio_rs-0.2.1/benches/_image_pipeline.py +63 -0
  9. dataio_rs-0.2.1/benches/bench_collate_paths.py +183 -0
  10. dataio_rs-0.2.1/benches/bench_loader_matrix.py +418 -0
  11. dataio_rs-0.2.1/benches/bench_pinned_h2d.py +156 -0
  12. dataio_rs-0.2.1/benches/transforms.rs +239 -0
  13. dataio_rs-0.2.1/examples/load_archive.py +116 -0
  14. dataio_rs-0.2.1/examples/load_image_batch.py +49 -0
  15. dataio_rs-0.2.1/examples/load_npy_dataset.py +48 -0
  16. dataio_rs-0.2.1/examples/load_safetensors_latents.py +55 -0
  17. dataio_rs-0.2.1/pyproject.toml +32 -0
  18. dataio_rs-0.2.1/python/dataio/__init__.py +106 -0
  19. dataio_rs-0.2.1/python/dataio/__init__.pyi +166 -0
  20. dataio_rs-0.2.1/python/dataio/_batch.py +115 -0
  21. dataio_rs-0.2.1/python/dataio/_batches.py +138 -0
  22. dataio_rs-0.2.1/python/dataio/_dataloader.py +84 -0
  23. dataio_rs-0.2.1/python/dataio/_dataset.py +547 -0
  24. dataio_rs-0.2.1/python/dataio/_samples.py +37 -0
  25. dataio_rs-0.2.1/python/dataio/_types.py +16 -0
  26. dataio_rs-0.2.1/python/dataio/lib.pyi +767 -0
  27. dataio_rs-0.2.1/python/dataio/ops.py +32 -0
  28. dataio_rs-0.2.1/python/dataio/py.typed +1 -0
  29. dataio_rs-0.2.1/python/tests/__init__.py +1 -0
  30. dataio_rs-0.2.1/python/tests/test_public_api.py +587 -0
  31. dataio_rs-0.2.1/src/archive.rs +392 -0
  32. dataio_rs-0.2.1/src/auth.rs +391 -0
  33. dataio_rs-0.2.1/src/batch.rs +292 -0
  34. dataio_rs-0.2.1/src/bytes_op.rs +282 -0
  35. dataio_rs-0.2.1/src/collate.rs +708 -0
  36. dataio_rs-0.2.1/src/cuda.rs +324 -0
  37. dataio_rs-0.2.1/src/decoder/bytes_passthrough.rs +26 -0
  38. dataio_rs-0.2.1/src/decoder/image.rs +294 -0
  39. dataio_rs-0.2.1/src/decoder/mod.rs +325 -0
  40. dataio_rs-0.2.1/src/decoder/npy.rs +501 -0
  41. dataio_rs-0.2.1/src/decoder/pt.rs +921 -0
  42. dataio_rs-0.2.1/src/decoder/safetensors.rs +423 -0
  43. dataio_rs-0.2.1/src/dlpack.rs +555 -0
  44. dataio_rs-0.2.1/src/error.rs +64 -0
  45. dataio_rs-0.2.1/src/executor.rs +386 -0
  46. dataio_rs-0.2.1/src/lib.rs +86 -0
  47. dataio_rs-0.2.1/src/loader.rs +805 -0
  48. dataio_rs-0.2.1/src/optimizer.rs +210 -0
  49. dataio_rs-0.2.1/src/plan.rs +1004 -0
  50. dataio_rs-0.2.1/src/process.rs +55 -0
  51. dataio_rs-0.2.1/src/request.rs +175 -0
  52. dataio_rs-0.2.1/src/rng.rs +94 -0
  53. dataio_rs-0.2.1/src/runtime.rs +38 -0
  54. dataio_rs-0.2.1/src/scheduler.rs +601 -0
  55. dataio_rs-0.2.1/src/schema.rs +75 -0
  56. dataio_rs-0.2.1/src/source.rs +950 -0
  57. dataio_rs-0.2.1/src/stats.rs +118 -0
  58. dataio_rs-0.2.1/src/storage.rs +382 -0
  59. dataio_rs-0.2.1/src/transform/affine.rs +224 -0
  60. dataio_rs-0.2.1/src/transform/augment.rs +210 -0
  61. dataio_rs-0.2.1/src/transform/geometric.rs +787 -0
  62. dataio_rs-0.2.1/src/transform/mod.rs +1547 -0
  63. dataio_rs-0.2.1/src/transform/pixel.rs +798 -0
  64. dataio_rs-0.2.1/src/transform/simd_blur.rs +383 -0
  65. dataio_rs-0.2.1/src/transform/simd_u8.rs +177 -0
  66. dataio_rs-0.2.1/src/transform/tests.rs +762 -0
  67. dataio_rs-0.2.1/src/transform/validation.rs +104 -0
  68. dataio_rs-0.2.1/src/transport/file.rs +173 -0
  69. dataio_rs-0.2.1/src/transport/http.rs +176 -0
  70. dataio_rs-0.2.1/src/transport/mod.rs +259 -0
  71. dataio_rs-0.2.1/src/transport/object_storage.rs +501 -0
  72. dataio_rs-0.2.1/uv.lock +8 -0
@@ -0,0 +1,2 @@
1
+ [target.x86_64-unknown-linux-gnu]
2
+ rustflags = ["-C", "link-arg=-fuse-ld=mold"]
@@ -0,0 +1,106 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+
8
+ env:
9
+ CARGO_TERM_COLOR: always
10
+
11
+ jobs:
12
+ linter:
13
+ name: Linter
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+
18
+ - uses: dtolnay/rust-toolchain@stable
19
+ with:
20
+ components: clippy, rustfmt
21
+
22
+ - name: Install native linkers
23
+ run: |
24
+ sudo apt-get update
25
+ sudo apt-get install -y build-essential binutils lld mold
26
+
27
+ - uses: actions/setup-python@v5
28
+ with:
29
+ python-version: "3.12"
30
+
31
+ - uses: astral-sh/setup-uv@v5
32
+ with:
33
+ enable-cache: true
34
+ cache-dependency-glob: |
35
+ pyproject.toml
36
+ uv.lock
37
+
38
+ - name: Cache cargo
39
+ uses: Swatinem/rust-cache@v2
40
+ with:
41
+ shared-key: linux-linter
42
+ cache-on-failure: true
43
+
44
+ - name: Rust format
45
+ run: cargo fmt --all -- --check
46
+
47
+ - name: Rust lint
48
+ run: cargo clippy --locked --all-targets -- -D warnings
49
+
50
+ - name: Python lint
51
+ run: uvx ruff check python examples benches
52
+
53
+ builder:
54
+ name: Builder
55
+ runs-on: ubuntu-latest
56
+ strategy:
57
+ fail-fast: false
58
+ matrix:
59
+ python-version: ["3.9", "3.12"]
60
+ steps:
61
+ - uses: actions/checkout@v4
62
+
63
+ - uses: dtolnay/rust-toolchain@stable
64
+
65
+ - name: Install native linkers
66
+ run: |
67
+ sudo apt-get update
68
+ sudo apt-get install -y build-essential binutils lld mold
69
+
70
+ - uses: actions/setup-python@v5
71
+ with:
72
+ python-version: ${{ matrix.python-version }}
73
+
74
+ - uses: astral-sh/setup-uv@v5
75
+ with:
76
+ enable-cache: true
77
+ cache-dependency-glob: |
78
+ pyproject.toml
79
+ uv.lock
80
+
81
+ - name: Cache cargo
82
+ uses: Swatinem/rust-cache@v2
83
+ with:
84
+ shared-key: linux-builder-py${{ matrix.python-version }}
85
+ cache-on-failure: true
86
+
87
+ - name: Rust tests
88
+ run: cargo test --locked
89
+
90
+ - name: Build wheel
91
+ run: uvx maturin build --release --locked --out dist
92
+
93
+ - name: Install wheel
94
+ run: uv pip install --system dist/*.whl
95
+
96
+ - name: Install test dependencies
97
+ run: uv pip install --system numpy
98
+
99
+ - name: Python tests
100
+ run: python -m unittest discover -s python/tests -p 'test_*.py'
101
+
102
+ - name: Upload wheel artifact
103
+ uses: actions/upload-artifact@v4
104
+ with:
105
+ name: dataio-rs-wheel-py${{ matrix.python-version }}
106
+ path: dist/*.whl
@@ -0,0 +1,12 @@
1
+ /target/
2
+ /dist/
3
+ /tmp/
4
+ /.venv/
5
+ __pycache__/
6
+ *.py[cod]
7
+ python/dataio/*.so
8
+ .pytest_cache/
9
+ .mypy_cache/
10
+ .ruff_cache/
11
+ repomix-output.xml
12
+ docs/