omniloader 1.0.0__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 (97) hide show
  1. omniloader-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +44 -0
  2. omniloader-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +27 -0
  3. omniloader-1.0.0/.github/dependabot.yml +13 -0
  4. omniloader-1.0.0/.github/pull_request_template.md +22 -0
  5. omniloader-1.0.0/.github/workflows/cd.yml +43 -0
  6. omniloader-1.0.0/.github/workflows/ci.yml +71 -0
  7. omniloader-1.0.0/.github/workflows/docs.yml +40 -0
  8. omniloader-1.0.0/.github/workflows/release-please.yml +18 -0
  9. omniloader-1.0.0/.gitignore +221 -0
  10. omniloader-1.0.0/.pre-commit-config.yaml +17 -0
  11. omniloader-1.0.0/.release-please-manifest.json +3 -0
  12. omniloader-1.0.0/CHANGELOG.md +142 -0
  13. omniloader-1.0.0/CODE_OF_CONDUCT.md +59 -0
  14. omniloader-1.0.0/CONTRIBUTING.md +113 -0
  15. omniloader-1.0.0/LICENSE +21 -0
  16. omniloader-1.0.0/Makefile +64 -0
  17. omniloader-1.0.0/PKG-INFO +610 -0
  18. omniloader-1.0.0/README.md +572 -0
  19. omniloader-1.0.0/SECURITY.md +30 -0
  20. omniloader-1.0.0/assets/logo/logo-icon.svg +16 -0
  21. omniloader-1.0.0/assets/logo/logo-icon_with_name.svg +20 -0
  22. omniloader-1.0.0/codecov.yml +15 -0
  23. omniloader-1.0.0/docs/_static/logo.svg +16 -0
  24. omniloader-1.0.0/docs/conf.py +81 -0
  25. omniloader-1.0.0/docs/index.rst +238 -0
  26. omniloader-1.0.0/omniloader/__init__.py +141 -0
  27. omniloader-1.0.0/omniloader/cli.py +156 -0
  28. omniloader-1.0.0/omniloader/collate.py +123 -0
  29. omniloader-1.0.0/omniloader/config.py +457 -0
  30. omniloader-1.0.0/omniloader/data/__init__.py +0 -0
  31. omniloader-1.0.0/omniloader/data/datasets.py +196 -0
  32. omniloader-1.0.0/omniloader/data/factory.py +99 -0
  33. omniloader-1.0.0/omniloader/data/npy.py +87 -0
  34. omniloader-1.0.0/omniloader/data/splits.py +119 -0
  35. omniloader-1.0.0/omniloader/integrations/__init__.py +0 -0
  36. omniloader-1.0.0/omniloader/integrations/lightning.py +151 -0
  37. omniloader-1.0.0/omniloader/introspection.py +190 -0
  38. omniloader-1.0.0/omniloader/loader.py +255 -0
  39. omniloader-1.0.0/omniloader/sampling/__init__.py +0 -0
  40. omniloader-1.0.0/omniloader/sampling/bucketing.py +120 -0
  41. omniloader-1.0.0/omniloader/sampling/sampler.py +112 -0
  42. omniloader-1.0.0/omniloader/sampling/strategies.py +394 -0
  43. omniloader-1.0.0/omniloader/sampling/subsamplers.py +150 -0
  44. omniloader-1.0.0/omniloader/sampling/weights.py +187 -0
  45. omniloader-1.0.0/omniloader/schema/__init__.py +0 -0
  46. omniloader-1.0.0/omniloader/schema/spec.py +261 -0
  47. omniloader-1.0.0/omniloader/schema/unify.py +135 -0
  48. omniloader-1.0.0/omniloader/templates/__init__.py +32 -0
  49. omniloader-1.0.0/omniloader/templates/config_template.yaml +211 -0
  50. omniloader-1.0.0/omniloader/transforms/__init__.py +146 -0
  51. omniloader-1.0.0/omniloader/transforms/augment.py +282 -0
  52. omniloader-1.0.0/omniloader/transforms/base.py +137 -0
  53. omniloader-1.0.0/omniloader/transforms/crop.py +122 -0
  54. omniloader-1.0.0/omniloader/transforms/mix.py +112 -0
  55. omniloader-1.0.0/omniloader/transforms/normalize.py +235 -0
  56. omniloader-1.0.0/omniloader/transforms/stats.py +272 -0
  57. omniloader-1.0.0/omniloader/utils/__init__.py +0 -0
  58. omniloader-1.0.0/omniloader/utils/padding.py +159 -0
  59. omniloader-1.0.0/omniloader/utils/seeding.py +31 -0
  60. omniloader-1.0.0/pyproject.toml +117 -0
  61. omniloader-1.0.0/release-please-config.json +10 -0
  62. omniloader-1.0.0/tests/__init__.py +0 -0
  63. omniloader-1.0.0/tests/configs/augmentation.json +15 -0
  64. omniloader-1.0.0/tests/configs/temperature.json +8 -0
  65. omniloader-1.0.0/tests/data/__init__.py +0 -0
  66. omniloader-1.0.0/tests/data/test_datasets.py +103 -0
  67. omniloader-1.0.0/tests/data/test_factory.py +56 -0
  68. omniloader-1.0.0/tests/data/test_npy.py +57 -0
  69. omniloader-1.0.0/tests/data/test_splits.py +52 -0
  70. omniloader-1.0.0/tests/fixtures.py +107 -0
  71. omniloader-1.0.0/tests/integrations/__init__.py +0 -0
  72. omniloader-1.0.0/tests/integrations/test_lightning.py +70 -0
  73. omniloader-1.0.0/tests/sampling/__init__.py +0 -0
  74. omniloader-1.0.0/tests/sampling/test_bucketing.py +59 -0
  75. omniloader-1.0.0/tests/sampling/test_sampler.py +72 -0
  76. omniloader-1.0.0/tests/sampling/test_strategies.py +161 -0
  77. omniloader-1.0.0/tests/sampling/test_subsamplers.py +72 -0
  78. omniloader-1.0.0/tests/sampling/test_weights.py +106 -0
  79. omniloader-1.0.0/tests/schema/__init__.py +0 -0
  80. omniloader-1.0.0/tests/schema/test_spec.py +108 -0
  81. omniloader-1.0.0/tests/schema/test_unify.py +88 -0
  82. omniloader-1.0.0/tests/test_cli.py +114 -0
  83. omniloader-1.0.0/tests/test_collate.py +59 -0
  84. omniloader-1.0.0/tests/test_config.py +265 -0
  85. omniloader-1.0.0/tests/test_introspection.py +101 -0
  86. omniloader-1.0.0/tests/test_loader.py +140 -0
  87. omniloader-1.0.0/tests/test_templates.py +36 -0
  88. omniloader-1.0.0/tests/transforms/__init__.py +0 -0
  89. omniloader-1.0.0/tests/transforms/test_crop.py +63 -0
  90. omniloader-1.0.0/tests/transforms/test_mix.py +96 -0
  91. omniloader-1.0.0/tests/transforms/test_normalize.py +133 -0
  92. omniloader-1.0.0/tests/transforms/test_stats.py +177 -0
  93. omniloader-1.0.0/tests/transforms/test_transforms.py +274 -0
  94. omniloader-1.0.0/tests/utils/__init__.py +0 -0
  95. omniloader-1.0.0/tests/utils/test_padding.py +83 -0
  96. omniloader-1.0.0/tests/utils/test_seeding.py +32 -0
  97. omniloader-1.0.0/uv.lock +2031 -0
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report something that is broken or not working as expected
4
+ labels: bug
5
+ assignees: fodorad
6
+ ---
7
+
8
+ ## Description
9
+
10
+ A clear and concise description of the bug.
11
+
12
+ ## Steps to reproduce
13
+
14
+ ```python
15
+ # Minimal reproducible example
16
+ import torch
17
+ from omniloader import DictTensorDataset, DatasetSchema, TensorSpec, OmniLoader
18
+
19
+ # ...
20
+ ```
21
+
22
+ ## Expected behaviour
23
+
24
+ What you expected to happen.
25
+
26
+ ## Actual behaviour
27
+
28
+ What actually happened. Include the full traceback if applicable.
29
+
30
+ ```
31
+ Traceback (most recent call last):
32
+ ...
33
+ ```
34
+
35
+ ## Environment
36
+
37
+ - OmniLoader version: <!-- e.g. 1.0.0 — run `pip show omniloader` -->
38
+ - PyTorch version: <!-- e.g. 2.11 -->
39
+ - Python version: <!-- e.g. 3.12.3 -->
40
+ - OS: <!-- e.g. Ubuntu 22.04 / macOS 15 / Windows 11 -->
41
+
42
+ ## Additional context
43
+
44
+ Any other information that might be helpful (dataset shapes, schema, etc.).
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest a new capability or improvement
4
+ labels: enhancement
5
+ assignees: fodorad
6
+ ---
7
+
8
+ ## Problem
9
+
10
+ What are you trying to do that OmniLoader does not currently support?
11
+
12
+ ## Proposed solution
13
+
14
+ A clear description of the feature or API you would like. Sketch the call site if
15
+ you can:
16
+
17
+ ```python
18
+ # What you wish you could write
19
+ ```
20
+
21
+ ## Alternatives considered
22
+
23
+ Any workarounds you have tried or other designs you weighed.
24
+
25
+ ## Additional context
26
+
27
+ Links to papers, datasets, or related multi-task-learning techniques.
@@ -0,0 +1,13 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: pip
4
+ directory: "/"
5
+ schedule:
6
+ interval: weekly
7
+ open-pull-requests-limit: 5
8
+
9
+ - package-ecosystem: github-actions
10
+ directory: "/"
11
+ schedule:
12
+ interval: weekly
13
+ open-pull-requests-limit: 5
@@ -0,0 +1,22 @@
1
+ ## Summary
2
+
3
+ <!-- One or two sentences describing what this PR does and why. -->
4
+
5
+ ## Type of change
6
+
7
+ - [ ] Bug fix (`fix:` commit)
8
+ - [ ] New feature (`feat:` commit)
9
+ - [ ] Breaking change (`feat!:` or `BREAKING CHANGE:` commit)
10
+ - [ ] Documentation update (`docs:` commit)
11
+ - [ ] Refactor / test / chore (no behaviour change)
12
+
13
+ ## Checklist
14
+
15
+ - [ ] `make fix` was run (ruff format + lint auto-fix)
16
+ - [ ] `make check` passes locally (lint + type-check + tests + docs build)
17
+ - [ ] New tests added for new or changed behaviour
18
+ - [ ] Docs updated if user-facing behaviour changed
19
+
20
+ ## Related issues
21
+
22
+ <!-- Closes #... -->
@@ -0,0 +1,43 @@
1
+ name: CD
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ publish:
11
+ name: Build, publish, and release
12
+ runs-on: ubuntu-latest
13
+ environment: cd
14
+ permissions:
15
+ id-token: write # required for OIDC trusted publisher (PyPI)
16
+ contents: write # required to create GitHub Release
17
+
18
+ steps:
19
+ - uses: actions/checkout@v7
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v6
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Set up uv
29
+ uses: astral-sh/setup-uv@v7
30
+ with:
31
+ enable-cache: true
32
+
33
+ - name: Build package
34
+ run: uv build
35
+
36
+ - name: Publish to PyPI
37
+ uses: pypa/gh-action-pypi-publish@release/v1
38
+
39
+ - name: Create GitHub Release
40
+ uses: softprops/action-gh-release@v3
41
+ with:
42
+ generate_release_notes: true
43
+ files: dist/*
@@ -0,0 +1,71 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main, dev]
8
+
9
+ jobs:
10
+ test:
11
+ name: test
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v7
16
+ with:
17
+ fetch-depth: 0 # required for hatch-vcs git describe
18
+
19
+ - name: Set up Python 3.12
20
+ uses: actions/setup-python@v6
21
+ with:
22
+ python-version: "3.12"
23
+
24
+ - name: Set up uv
25
+ uses: astral-sh/setup-uv@v7
26
+ with:
27
+ enable-cache: true
28
+
29
+ - name: Install dependencies
30
+ run: |
31
+ # On Linux CI, use CPU-only PyTorch wheels to avoid CUDA runtime
32
+ # dependencies that are absent on the runner. PEP 440 ignores local
33
+ # version segments, so torch>=2.0 matches both the CPU and CUDA builds.
34
+ uv pip install --system --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match -e ".[all,dev,docs]"
35
+
36
+ - name: Audit dependencies for vulnerabilities
37
+ run: uvx pip-audit
38
+ continue-on-error: true # torch may have known CVEs; treat as warning
39
+
40
+ - name: Ruff Lint
41
+ run: ruff check .
42
+
43
+ - name: Ruff Format
44
+ run: ruff format --check .
45
+
46
+ - name: Type check (ty)
47
+ run: ty check omniloader
48
+
49
+ - name: Test & Coverage
50
+ run: |
51
+ coverage run -m unittest discover -s tests -v
52
+ coverage report
53
+ coverage html
54
+ coverage xml -o coverage.xml
55
+
56
+ - name: Upload coverage reports to Codecov
57
+ uses: codecov/codecov-action@v7
58
+ with:
59
+ token: ${{ secrets.CODECOV_TOKEN }}
60
+ files: coverage.xml
61
+ fail_ci_if_error: true
62
+
63
+ - name: Upload coverage HTML
64
+ uses: actions/upload-artifact@v7
65
+ with:
66
+ name: coverage-report
67
+ path: coverage_html/
68
+ if: always()
69
+
70
+ - name: Build docs
71
+ run: sphinx-build -b html docs/ site/
@@ -0,0 +1,40 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ deploy:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v7
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v6
22
+ with:
23
+ python-version: "3.12"
24
+
25
+ - name: Set up uv
26
+ uses: astral-sh/setup-uv@v7
27
+ with:
28
+ enable-cache: true
29
+
30
+ - name: Install package and docs dependencies
31
+ run: uv pip install --system --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match -e ".[docs]"
32
+
33
+ - name: Build docs
34
+ run: sphinx-build -b html docs/ site/
35
+
36
+ - name: Deploy to GitHub Pages
37
+ uses: peaceiris/actions-gh-pages@v4
38
+ with:
39
+ github_token: ${{ secrets.GITHUB_TOKEN }}
40
+ publish_dir: ./site
@@ -0,0 +1,18 @@
1
+ name: Release Please
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+
7
+ permissions:
8
+ contents: write
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ release-please:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: googleapis/release-please-action@v5
16
+ with:
17
+ release-type: python
18
+ token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
@@ -0,0 +1,221 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # MacOS
7
+ .DS_Store
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py.cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ # Pipfile.lock
99
+
100
+ # UV
101
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ # uv.lock
105
+
106
+ # poetry
107
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111
+ # poetry.lock
112
+ # poetry.toml
113
+
114
+ # pdm
115
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
116
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
117
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
118
+ # pdm.lock
119
+ # pdm.toml
120
+ .pdm-python
121
+ .pdm-build/
122
+
123
+ # pixi
124
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
125
+ # pixi.lock
126
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
127
+ # in the .venv directory. It is recommended not to include this directory in version control.
128
+ .pixi
129
+
130
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
131
+ __pypackages__/
132
+
133
+ # Celery stuff
134
+ celerybeat-schedule
135
+ celerybeat.pid
136
+
137
+ # Redis
138
+ *.rdb
139
+ *.aof
140
+ *.pid
141
+
142
+ # RabbitMQ
143
+ mnesia/
144
+ rabbitmq/
145
+ rabbitmq-data/
146
+
147
+ # ActiveMQ
148
+ activemq-data/
149
+
150
+ # SageMath parsed files
151
+ *.sage.py
152
+
153
+ # Environments
154
+ .env
155
+ .envrc
156
+ .venv
157
+ env/
158
+ venv/
159
+ ENV/
160
+ env.bak/
161
+ venv.bak/
162
+
163
+ # Spyder project settings
164
+ .spyderproject
165
+ .spyproject
166
+
167
+ # Rope project settings
168
+ .ropeproject
169
+
170
+ # mkdocs documentation
171
+ /site
172
+
173
+ # mypy
174
+ .mypy_cache/
175
+ .dmypy.json
176
+ dmypy.json
177
+
178
+ # Pyre type checker
179
+ .pyre/
180
+
181
+ # pytype static type analyzer
182
+ .pytype/
183
+
184
+ # Cython debug symbols
185
+ cython_debug/
186
+
187
+ # PyCharm
188
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
189
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
190
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
191
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
192
+ # .idea/
193
+
194
+ # Abstra
195
+ # Abstra is an AI-powered process automation framework.
196
+ # Ignore directories containing user credentials, local state, and settings.
197
+ # Learn more at https://abstra.io/docs
198
+ .abstra/
199
+
200
+ # Visual Studio Code
201
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
202
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
203
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
204
+ # you could uncomment the following to ignore the entire vscode folder
205
+ # .vscode/
206
+ # Temporary file for partial code execution
207
+ tempCodeRunnerFile.py
208
+
209
+ # Ruff stuff:
210
+ .ruff_cache/
211
+
212
+ # PyPI configuration file
213
+ .pypirc
214
+
215
+ # Marimo
216
+ marimo/_static/
217
+ marimo/_lsp/
218
+ __marimo__/
219
+
220
+ # Streamlit
221
+ .streamlit/secrets.toml
@@ -0,0 +1,17 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.8.4
4
+ hooks:
5
+ - id: ruff
6
+ args: [--fix]
7
+ - id: ruff-format
8
+
9
+ - repo: local
10
+ hooks:
11
+ - id: ty-check
12
+ name: ty type check
13
+ entry: ty check
14
+ args: [omniloader]
15
+ language: system
16
+ types: [python]
17
+ pass_filenames: false
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.0.0"
3
+ }
@@ -0,0 +1,142 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+ Releases are managed automatically with
8
+ [release-please](https://github.com/googleapis/release-please) from
9
+ [Conventional Commits](https://www.conventionalcommits.org/). Future entries will
10
+ list the changes relative to the previous release.
11
+
12
+ ## 1.0.0 (2026-07-07)
13
+
14
+
15
+ ### Features
16
+
17
+ * initial public release of OmniLoader ([5814077](https://github.com/fodorad/OmniLoader/commit/58140772992fb70a77865b4bacf5756cbd18da10))
18
+
19
+ ## 1.0.0 (2026-07-05)
20
+
21
+ Initial public release. OmniLoader is a modality- and model-agnostic PyTorch meta
22
+ data loader that unifies datasets with disjoint annotations into one masked sample
23
+ scheme for joint multi-task training.
24
+
25
+ ### Unified sample scheme
26
+
27
+ - **`OmniLoader`** concatenates any number of source datasets and presents them as
28
+ one dataset whose every sample follows a shared `UnifiedSchema`. Keys a source
29
+ lacks are filled with a placeholder tensor plus an all-`False` `<name>_mask`, so a
30
+ single batch may freely mix samples from different datasets.
31
+ - **`SampleUnifier`** maps raw sample dicts onto the union schema, padding or cropping
32
+ sequence values to their declared length and ingesting any dataset-supplied
33
+ `<name>_mask` (aligned and AND-ed with the padding mask). Metadata (`dataset`,
34
+ `subset`, `key`) is preserved.
35
+ - **`unified_collate`** stacks tensor entries and gathers string metadata into lists.
36
+
37
+ ### Structural schema
38
+
39
+ - **`TensorSpec`** declares a single value — a feature or target purely by which list
40
+ it is placed in — as a **vector** (`()` or `(F,)`) or a **sequence** (`(T,)` or
41
+ `(T, F)`); it is a sequence exactly when `time_dim` is set. No modality or model
42
+ concept appears anywhere.
43
+ - **`DatasetSchema`** / **`UnifiedSchema`** hold per-dataset specs and merge them into
44
+ the validated union (shared keys must agree on shape and dtype).
45
+
46
+ ### Dataset adapters
47
+
48
+ - **`HDF5Dataset`** reads per-sample groups from HDF5 (worker-safe lazy handle,
49
+ byte-string decoding), with optional `cache_size` (LRU) and `preload`.
50
+ - **`NpyFolderDataset`** reads memory-mapped `root/<sample>/<key>.npy` folders.
51
+ - **`DictTensorDataset`** provides an in-memory, random-tensor dataset for tests and
52
+ quick experiments.
53
+ - **`split_indices`** (+ `save_split_info` / `load_split_info`) produces reproducible,
54
+ optionally stratified train/val/test index splits.
55
+
56
+ ### Mixing strategies
57
+
58
+ - **`ProportionalStrategy`**, **`TemperatureStrategy`** (`size ** (1 / T)`;
59
+ `temperature=2` recovers square-root scaling), **`AnnealedTemperatureStrategy`**
60
+ (per-epoch annealing), **`FixedWeightStrategy`** (explicit or uniform weights), and
61
+ **`RoundRobinStrategy`** (equal, interleaved draws) — each producing a flat list of
62
+ global indices per epoch.
63
+
64
+ ### Subsampling
65
+
66
+ - **`SubsampleConfig`** / **`IndexPool`** support with/without-replacement draws, two
67
+ exhaustion policies (`FRESH` re-randomises every epoch, `EXHAUST` covers the whole
68
+ dataset before any reuse), per-dataset `effective_size`, and per-sample
69
+ `sample_weights` — all reproducible from a seed and epoch.
70
+ - **`class_weights_for_sampler`** derives per-sample inverse-frequency `sample_weights`
71
+ from a target (for the sampler).
72
+
73
+ ### Class balance
74
+
75
+ - **`class_weights_for_loss`** and **`class_histogram`** compute per-class **loss** weights and
76
+ exact counts over every valid labelled position of a categorical target (schemes:
77
+ inverse frequency or effective-number-of-samples, Cui et al. 2019). Persist and reuse
78
+ via ``omniloader class-weights-for-loss CONFIG --target KEY -o weights.json`` for
79
+ `CrossEntropyLoss(weight=...)` — the loss/model usage stays in your training code.
80
+
81
+ ### Variable-length batching
82
+
83
+ - **`DynamicCollator`** pads each sequence key to the batch's longest sample instead of
84
+ a fixed `time_dim` (pair with `OmniLoader(pad_features=False)`).
85
+ - **`LengthBucketBatchSampler`** (+ `OmniLoader.sequence_lengths`) groups similar-length
86
+ sequences to minimise padding waste in the native-length regime.
87
+
88
+ ### Normalization
89
+
90
+ - **`Normalize`**, **`MinMaxNormalize`**, **`RobustNormalize`** (median/IQR) and
91
+ **`InstanceNormalize`** (per-sample, no external stats).
92
+ - **`PerDatasetNormalize`** standardizes each sample by **its source dataset's** own
93
+ statistics (selected from the `dataset` metadata key) — the CMVN/AdaBN remedy for
94
+ cross-corpus domain shift — with a `fallback` (`instance` / `union` / `identity`) for
95
+ dataset ids unseen at training time, so inference on new sources is handled
96
+ deliberately.
97
+ - **`compute_stats`** (pooled) and **`compute_dataset_stats`** (per source dataset)
98
+ return mean/std/min/max/median/iqr over valid positions; `save_stats` / `load_stats`
99
+ round-trip either the flat or nested per-dataset form through JSON. The streaming
100
+ `compute_feature_stats` remains for `(mean, std)` only. Config transforms may
101
+ reference a saved stats file via `stats_path` / `union_stats_path` (loaded with
102
+ `load_stats`) instead of inlining the numbers, so normalization is fully config-driven.
103
+
104
+ ### Augmentation
105
+
106
+ - **`GaussianNoise`** (feature corruption), **`FeatureDropout`** (stream/modality
107
+ dropout, keeps at least one stream), **`SpanMasking`** (SpecAugment-style time spans),
108
+ **`FeatureMasking`** (feature bands), **`TimeWarp`** (random speed perturbation),
109
+ **`RandomCrop`** / **`CenterCrop`** (shared offset keeps features and targets aligned),
110
+ and **`MixupCollator`** (MixUp/CutMix at collate, emitting `mixup_lambda` and paired
111
+ targets for the model to combine — no loss logic in the library).
112
+ - **`Compose`** chains transforms; every transform is mask-aware, seedable and
113
+ self-skips during evaluation.
114
+
115
+ ### Distributed & reproducibility
116
+
117
+ - **`OmniSampler`** turns a strategy into a per-epoch index stream and shards it across
118
+ `rank` / `num_replicas` (inferred from `torch.distributed`) for multi-GPU runs.
119
+ - Per-sample augmentation is seeded from `(seed, epoch, index)` via `set_epoch`, and
120
+ **`seed_worker`** seeds DataLoader workers — augmentation is deterministic and
121
+ independent of worker count.
122
+
123
+ ### Introspection
124
+
125
+ - **`describe`** (coverage matrix, valid fractions, class distributions) and
126
+ **`validate`** (dry-run spec check), plus `OmniLoader.describe()` / `.validate()`.
127
+
128
+ ### Configuration, CLI & Lightning
129
+
130
+ - **`OmniConfig`** loads from a dict, JSON or YAML and describes an entire run — seed,
131
+ DataLoader knobs, mixing strategy, per-dataset subsampling, transform pipeline,
132
+ collate function, length bucketing, distributed settings and the datasets themselves.
133
+ **`build_dataloader`** assembles a ready `DataLoader` end-to-end; `build_loader`,
134
+ `build_strategy`, `build_transform`, `build_collate`, `build_subsample` and
135
+ `build_datasets` expose the pieces. `seed_everything` seeds Python, NumPy and PyTorch.
136
+ - **`omniloader` CLI**: `describe` / `validate` / `compute-stats` / `class-weights-for-loss`
137
+ over a config file.
138
+ - **Annotated config template** shipped as package data (`config_template.yaml`),
139
+ documenting every option with defaults; locate it with `config_template_path`.
140
+ - **`OmniDataModule`** (optional `omniloader[lightning]` extra) wires train/val/test
141
+ splits, the mixing strategy, distributed sharding and seeding; the core stays
142
+ pure-torch.