Skip to main content
logo

xdrl 🔍

Documentation xdrl license uv Ruff python versions

codecov ci docs

Typed model interactions for TorchRL, with TDHook observability and intervention.

Getting Started

xdrl keeps TensorDict data and TorchRL execution native. It adds explicit schemas and execution context around model calls, then runs TDHook v0.2 workflows through that interaction with exception-safe cleanup and model-pass evidence.

from tdhook.latent import ActivationCaching
from tdhook.workflow import Workflow
from xdrl import TDHookWorkflowRunner

# `interaction` is a RuntimeInteractionContext declaring the policy role,
# TensorDict schemas, batch semantics, and evaluation/collection phase.
workflow = Workflow(
    ActivationCaching("module.0", cache_key=("activations", "encoder"))
)
execution = TDHookWorkflowRunner(interaction).run(
    workflow, batch, code_revision="your-git-revision"
)
encoder_activations = execution.data["activations", "encoder"]

See the complete quickstart, architecture, and compatibility contract.

The supported boundary is currently local, synchronous TensorDict module execution. Compiled, remote, distributed, and worker-copied policies are not silently treated as supported.

Development tracks the latest TensorDict and TorchRL main branches. The lockfile records the exact revisions exercised by CI; see the compatibility contract.

Development

This project uses uv to manage Python dependencies and just to run the conformance and documentation gates.

Documentation

See the full documentation at https://xdrl.readthedocs.io.

License

xdrl is licensed under the MIT License. See LICENSE for details.

Download files

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

Source Distribution

xdrl-0.2.0.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

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

xdrl-0.2.0-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file xdrl-0.2.0.tar.gz.

File metadata

  • Download URL: xdrl-0.2.0.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for xdrl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a1fbd3c2dba5b0cfebc2a46952ce49d2adc86f727946035958f9755469937123
MD5 a2fe5c3e1d31cbec4d419a01733b26ac
BLAKE2b-256 167b9e10873bfc75c29fde94c22aa30c8abe9948ded59fd460b28f1e53ecf354

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdrl-0.2.0.tar.gz:

Publisher: publish.yml on Xmaster6y/xdrl

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

File details

Details for the file xdrl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: xdrl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for xdrl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da442b3eac2acf2c1594cb243697aae70b0829e06611f3da9cab960952c8a429
MD5 d567feeeba9ae473b67a5848b72ecb34
BLAKE2b-256 262f1b2512f0bfbdce8ca71b7c57e232135fb398c707c72f2bf6c364cb6d50a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdrl-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Xmaster6y/xdrl

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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page