Metadata-Version: 2.4
Name: xrtm-train
Version: 0.3.1
Summary: The Learning/Optimization layer for XRTM.
Author-email: XRTM Team <moy@xrtm.org>
License-Expression: Apache-2.0
Requires-Python: <3.13,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic>=2.0.0
Requires-Dist: xrtm-data>=0.2.7
Requires-Dist: xrtm-eval>=0.2.7
Requires-Dist: xrtm-forecast>=0.6.11
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: license-file

# xrtm-train v0.3.0

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

**The Optimization Layer for XRTM.**

`xrtm-train` provides backtesting, trace replay, and training sample construction for forecast evaluation.

## Installation

```bash
pip install xrtm-train
```

## Components

### Backtester
Run an Agent against (question, resolution) pairs and compute Brier scores.

```python
from xrtm.train import Backtester
```

### BacktestRunner
Run a full Orchestrator workflow graph against a dataset with ECE and slice analytics.

```python
from xrtm.train import BacktestRunner
```

### TraceReplayer
Save and replay execution traces for reproducible evaluation.

```python
from xrtm.train import TraceReplayer
```

### TrainingSampleBuilder
Build training samples using Teacher Forcing (current prior = previous ground truth).

```python
from xrtm.train.kit.builders import TrainingSampleBuilder
```

## Dependencies

- `pydantic`
- `xrtm-data`
- `xrtm-eval`
- `xrtm-forecast`

## License

Apache 2.0
