Metadata-Version: 2.4
Name: priorstudio-core
Version: 0.5.0
Summary: Core abstractions for PriorStudio — Prior, Model, Eval, Run, and the block registry.
Project-URL: Homepage, https://priorstudio.ai
Project-URL: Repository, https://github.com/profitopsai/priorstudio
Project-URL: Issues, https://github.com/profitopsai/priorstudio/issues
Project-URL: Documentation, https://github.com/profitopsai/priorstudio/tree/main/docs
Author: PriorStudio contributors
License: Apache-2.0
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Requires-Dist: numpy>=1.26
Requires-Dist: pydantic>=2.6
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: torch
Requires-Dist: torch>=2.2; extra == 'torch'
Description-Content-Type: text/markdown

# priorstudio-core

The Python contract for PriorStudio FM projects.

```python
from priorstudio_core import Prior, Model, Eval, Run, register_block, register_prior

@register_prior("my_prior")
class MyPrior(Prior):
    def sample(self, seed: int): ...

@register_block("my_attention")
class MyAttention:
    def __init__(self, d_model: int, n_heads: int): ...
```

The CLI discovers anything registered via these decorators and validates `models/*.yaml` references against the registry.

## Layout

- `prior.py` — `Prior` ABC and built-in prior loader
- `model.py` — `Model` config + block-composition
- `eval.py` — `Eval` config + result schema
- `run.py` — `Run` manifest + executor protocol
- `registry.py` — `@register_prior`, `@register_block`, `@register_eval` and discovery
- `loaders.py` — load YAML artifacts into typed objects
- `blocks/` — built-in architecture blocks (transformer encoder, causal attention, heads)
- `training/` — minimal in-process training loop for the `local` compute adapter
