Repository navigation
Developer Guide
The public surface starts at datashoal/__init__.py. Preserve cache-first model loading, repeatable calibration streams and support for free-threaded CPython. The build backend uses the standard library. LogBar is the only Python dependency and has zero runtime dependencies. NumPy, PyArrow and HF Datasets are used separately for benchmarking and interoperability checks.
| Area | Implementation | Verification |
|---|---|---|
| Load policy, snapshots, Viewer and providers |
api.py, hub.py, modelscope.py
|
test_artifacts.py, test_hub.py, test_modelscope.py
|
| Native templates |
templates.py, native/template.h
|
test_templates.py |
| Native streams, shards and HF transforms |
dataset.py, hf_compat.py, _compat_*.py
|
test_dataset.py, test_shards.py, test_hf_compat.py
|
| Parquet, Arrow and JIT codecs |
parquet.py, arrow.py, _jit.py, native/
|
test_parquet.py, test_native.py, test_jit.py
|
| Xet reads and writes |
xet.py, _xet_upload.py
|
Transfer fixtures and integrity checks in test_artifacts.py
|
| Cross-thread behavior | Cursor ownership, per-pass state and atomic publication |
test_free_threading.py and the free-threaded suite |
From the repository root, using the corresponding interpreters:
PYTHONPATH=. python3 -S -m unittest discover -s tests
python3.14t -X gil=0 -S tests/run_free_threaded.pyThe second command checks the actual GIL state before and after the suite. For a performance change, run the public benchmark with identical outputs and matched tool versions, data and cache conditions. The release workflow builds the universal wheel and sdist, verifies the artifacts contain the C sources, tests the installed wheel and publishes on a GitHub release or an explicitly enabled manual run.
Wiki pages live in the separate ModelCloud/DataShoal.wiki.git repository. Update the relevant guides, reference tables, examples and troubleshooting advice with changes affecting documented behavior. Cover newly supported operations and remove outdated guidance for removed features. Update Home and the sidebar when the navigation changes, and verify links and examples before publishing. The main repository contains the contributor contract and the wiki maintenance skill. Project contract · Wiki maintenance skill
For native codecs, verify offset arithmetic, allocation bounds, ownership and release paths in both CPython modes. Run affected code with AddressSanitizer and UndefinedBehaviorSanitizer. Native safety skill
From a checkout on Linux or macOS, run PYTHONPATH=. python tests/fuzz_codecs.py --cases 250. Add --seed 42 to replay a batch, or use the reported case seed and --cases 1 to isolate a failure. The parent runs a separate worker, monitors its resident memory and wall time, and treats signals, timeouts and budget breaches as failures. The worker also limits CPU time and output file size. Set --memory-mib and --timeout to adjust the run budget.
The harness compares generated and mutated inputs across the JIT and portable codecs, checks SafeTensors concurrent reads and streaming, and exercises Parquet and Arrow boundaries. Push and pull-request CI run short batches. A daily job uses a fresh seed for longer runs. Linux CI exercises an ASan/UBSan JIT build and a free-threaded CPython interpreter. Fuzz harness · CI workflow
Get started
- Installation and quickstart
- Python API reference
- Native templates
- Native extension ABI
- Loading reference
Prepare calibration data
Manage artifacts
Operate and contribute