xdrl 🔍
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1fbd3c2dba5b0cfebc2a46952ce49d2adc86f727946035958f9755469937123
|
|
| MD5 |
a2fe5c3e1d31cbec4d419a01733b26ac
|
|
| BLAKE2b-256 |
167b9e10873bfc75c29fde94c22aa30c8abe9948ded59fd460b28f1e53ecf354
|
Provenance
The following attestation bundles were made for xdrl-0.2.0.tar.gz:
Publisher:
publish.yml on Xmaster6y/xdrl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xdrl-0.2.0.tar.gz -
Subject digest:
a1fbd3c2dba5b0cfebc2a46952ce49d2adc86f727946035958f9755469937123 - Sigstore transparency entry: 2345285387
- Sigstore integration time:
-
Permalink:
Xmaster6y/xdrl@52e5b72af5d72d65220becb94698bf0355c402d3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Xmaster6y
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@52e5b72af5d72d65220becb94698bf0355c402d3 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da442b3eac2acf2c1594cb243697aae70b0829e06611f3da9cab960952c8a429
|
|
| MD5 |
d567feeeba9ae473b67a5848b72ecb34
|
|
| BLAKE2b-256 |
262f1b2512f0bfbdce8ca71b7c57e232135fb398c707c72f2bf6c364cb6d50a0
|
Provenance
The following attestation bundles were made for xdrl-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Xmaster6y/xdrl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xdrl-0.2.0-py3-none-any.whl -
Subject digest:
da442b3eac2acf2c1594cb243697aae70b0829e06611f3da9cab960952c8a429 - Sigstore transparency entry: 2345285414
- Sigstore integration time:
-
Permalink:
Xmaster6y/xdrl@52e5b72af5d72d65220becb94698bf0355c402d3 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Xmaster6y
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@52e5b72af5d72d65220becb94698bf0355c402d3 -
Trigger Event:
push
-
Statement type: