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.

Metadata

Release files for xdrl 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xdrl 0.2.0
File Size Uploaded Provenance Actions
xdrl-0.2.0.tar.gz 30.9 kB With provenance Details for xdrl-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xdrl 0.2.0
File Interpreter ABI Platform Actions
xdrl-0.2.0-py3-none-any.whl Python 3 none any Details for xdrl-0.2.0-py3-none-any.whl

Total release size: 63.8 kB

Release files / xdrl-0.2.0.tar.gz

Download URL xdrl-0.2.0.tar.gz
Size 30.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a1fbd3c2dba5b0cfebc2a46952ce49d2adc86f727946035958f9755469937123
BLAKE2b-256 checksum
How to use checksums
167b9e10873bfc75c29fde94c22aa30c8abe9948ded59fd460b28f1e53ecf354
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Release files / xdrl-0.2.0-py3-none-any.whl

Download URL xdrl-0.2.0-py3-none-any.whl
Size 32.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da442b3eac2acf2c1594cb243697aae70b0829e06611f3da9cab960952c8a429
BLAKE2b-256 checksum
How to use checksums
262f1b2512f0bfbdce8ca71b7c57e232135fb398c707c72f2bf6c364cb6d50a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

Security for xdrl 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xdrl-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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