Metadata-Version: 2.4
Name: dryml
Version: 0.3.0b2
Summary: Don't Repeat Yourself Machine Learning: A Machine Learning library to reduce code duplication, and increase portability and interoperability in the Machine Learning Space.
Home-page: https://github.com/ncsa/dryml
Author: Matthew Krafczyk
Author-email: mkrafcz2@illinois.edu
License: Apache-2.0
Project-URL: homepage, https://github.com/ncsa/dryml
Project-URL: Bug Tracker, https://github.com/ncsa/dryml/issues
Keywords: ML
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dill
Requires-Dist: tqdm
Requires-Dist: numpy
Requires-Dist: ml_dtypes>=0.6.0
Requires-Dist: pandas>=2.3.3
Requires-Dist: gputil
Requires-Dist: packaging
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: flake8; extra == "test"
Requires-Dist: pyarrow>=25.0.1; extra == "test"
Requires-Dist: netCDF4>=1.7.4; extra == "test"
Provides-Extra: parquet
Requires-Dist: pyarrow>=25.0.1; extra == "parquet"
Provides-Extra: netcdf
Requires-Dist: netCDF4>=1.7.4; extra == "netcdf"
Provides-Extra: tf
Requires-Dist: tensorflow; python_version < "3.14" and extra == "tf"
Requires-Dist: tensorflow-datasets; python_version < "3.14" and extra == "tf"
Provides-Extra: torch
Requires-Dist: torch; extra == "torch"
Provides-Extra: jax
Requires-Dist: jax; extra == "jax"
Requires-Dist: jaxlib; extra == "jax"
Provides-Extra: sklearn
Requires-Dist: scikit-learn; extra == "sklearn"
Provides-Extra: xgboost
Requires-Dist: numpy==2.1.3; extra == "xgboost"
Requires-Dist: scipy==1.18.0; extra == "xgboost"
Requires-Dist: pandas==3.0.5; extra == "xgboost"
Requires-Dist: scikit-learn==1.9.0; extra == "xgboost"
Requires-Dist: xgboost==3.4.1; extra == "xgboost"
Provides-Extra: statsmodels
Requires-Dist: numpy==2.1.3; extra == "statsmodels"
Requires-Dist: scipy==1.18.0; extra == "statsmodels"
Requires-Dist: pandas==3.0.5; extra == "statsmodels"
Requires-Dist: statsmodels==0.15.0; extra == "statsmodels"
Provides-Extra: ray
Requires-Dist: ray[default]==2.56.0; extra == "ray"
Dynamic: license-file

# DRYML

DRYML provides immutable construction definitions, exact graph references, and local checkpoint publication for Python machine-learning objects.

## CDef V2

`Definition` is a soft declaration. Concretizing it produces a `ConcreteDefinition` (CDef): a fully bound structural recipe. CDef equality and `stable_hash()` compare class and semantic parameters; they intentionally do not include graph sharing or object identity. `CDef.graph_equal()` and `graph_hash()` additionally preserve shared versus independent equal nodes.

`ObjectRef` adds durable `ObjectId` lineage for every owned `Serializable` node. `StateRef` adds one immutable local-state hash for each of those paths. Inspecting CDefs, ObjectRefs, StateRefs, and structural queries is import-free. CDef `.args` and `.kwargs` are call projections and may import the current class; use `.cls` and `.parameters` for inspection.

```python
from dryml import Definition, Object, Repo, Serializable
from dryml.core.store.dir import DirStore


class Counter(Serializable):
    def __init__(self, value=0):
        super().__init__()
        self.value = value


repo = Repo(DirStore("./checkpoint-store"))
counter = Counter(3, repo=repo)
state = counter.save(repo=repo)
restored = repo.load_state_ref(state)
assert restored.object_ref == state.object
```

`Object.save()` publishes immutable directory state and returns a `StateRef`. `federated=False` is self-contained by default; `federated=True` may retain immutable dependencies in connected Stores. `deep_capture=True` captures each owned serializable node once. There is no automatic mutation detection: call `save()` after relevant mutation.

See [Objects and Definitions](docs/objects_and_defs.md), [Repos and Stores](docs/repos.md), [Formats](docs/formats.md), and [Graph Querying](docs/graph_querying.md).
