Skip to main content

The Learning/Optimization layer for XRTM.

Project description

xrtm-train

License Python PyPI

The Optimization Layer for XRTM.

xrtm-train is the engine that closes the loop. It simulates history by replaying agents against past "Ground Truth" snapshots stored in xrtm-data, scoring them with xrtm-eval, and optimizing their reasoning parameters.

Part of the XRTM Ecosystem

Layer 4: xrtm-train    → (imports all) ← YOU ARE HERE
Layer 3: xrtm-forecast → (imports eval, data)
Layer 2: xrtm-eval     → (imports data)
Layer 1: xrtm-data     → (zero dependencies)

xrtm-train sits at the top of the stack and can import from ALL other packages. Installing xrtm-train gives you the full XRTM stack.

Installation

pip install xrtm-train

This automatically installs xrtm-forecast, xrtm-eval, and xrtm-data.

Core Primitives

The Simulation Loop

The Backtester orchestrates the simulation. It ensures strict temporal isolation—agents are never exposed to data from the future.

from xrtm.train import Backtester

# Initialize components
backtester = Backtester(agent=my_agent, evaluator=my_evaluator)

# Run simulation
results = await backtester.run(dataset=historical_questions)
print(f"Mean Brier Score: {results.mean_score}")

Examples (v0.1.2+)

With the v0.6.0 architecture split, calibration and replay examples now live here:

Project Structure

src/xrtm/train/
├── core/            # Interfaces & Schemas
│   └── eval/            # Calibration (PlattScaler, BetaScaler)
├── kit/             # Training utilities
│   ├── memory/          # Replay buffers
│   └── optimization/    # Training strategies
├── simulation/      # Backtester, TraceReplayer
└── providers/       # Remote training backends (future)

Development

Prerequisites:

# Install dependencies
uv sync

# Run tests
uv run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xrtm_train-0.2.3.tar.gz (37.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xrtm_train-0.2.3-py3-none-any.whl (42.6 kB view details)

Uploaded Python 3

File details

Details for the file xrtm_train-0.2.3.tar.gz.

File metadata

  • Download URL: xrtm_train-0.2.3.tar.gz
  • Upload date:
  • Size: 37.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xrtm_train-0.2.3.tar.gz
Algorithm Hash digest
SHA256 25afcdf9bc5917d3831bd2987ec022e62fd9662407501a3a8f3203b5e1592c95
MD5 31c80470a939a2d9c8385ca3c8f34c13
BLAKE2b-256 4b76db2736679bc926ddbec9fddaf8bfa7d5ad4a981bf5ff3f55fa5072be7216

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrtm_train-0.2.3.tar.gz:

Publisher: publish.yml on xrtm-org/train

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xrtm_train-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: xrtm_train-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 42.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xrtm_train-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83d7f0a0c4da44e7f00b2b2354a7d6cb8228c2df1f2cd3589942f162a3aad9d2
MD5 be1c2736c00c3b2ef1de3b3f2fdb7512
BLAKE2b-256 963af18836b01a9292754f26c11db6dffe260159d1da3adbfeb38f667b442e10

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrtm_train-0.2.3-py3-none-any.whl:

Publisher: publish.yml on xrtm-org/train

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page