Skip to main content

align-utils

Parse align-system run data, load Open World episodes, and export CSV/TSV. Install with the repository setup.

Read and write files

from align_utils.discovery import load_json, load_yaml, save_json, save_yaml

config = load_yaml("config.yaml")
data = load_json("data.json")
save_yaml(config, "output.yaml")
save_json(data, "output.json")

Export rows

from align_utils.exporters import export_to_csv, export_to_tsv

rows = [{"run": "baseline", "score": 0.8}, {"run": "aligned", "score": 0.9}]
export_to_csv(rows, "results.csv")
export_to_tsv(rows, "results.tsv")

Load Open World runs

Find runs recursively and load their episodes, including unfinished runs. See supported files.

from pathlib import Path
from align_utils.open_world import find_open_world_runs, load_run

for run_dir in find_open_world_runs(Path("outputs")):
    run = load_run(run_dir)
    for episode in run.episodes:
        score = episode.outcome.session_alignment_score if episode.outcome else None
        print(episode.scenario_id, episode.alignment_target_id, len(episode.records), score)
  • Records: actions retain their order, including repeats. record.source keeps original JSON values and unknown fields; model dumps exclude it.
  • Episodes: scenario or target changes start a new episode. A clock reset in the same or initial scene starts another; entering a later scene can reset its clock within the current episode. Missing scene metadata uses the clock-only fallback.
  • Scores: matching completion lines in raw_align_system.log supply episode.outcome. A mismatch sets run.score_warning and omits scores while retaining actions. The scored target is episode.outcome.alignment_target_id, including for unaligned ADMs.
  • Driver actions: record.chosen_by_driver marks actions taken by the driver; their choice_info may describe the previous step.

Metadata

Release files for align-utils 2.0.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 align-utils 2.0.0
File Size Uploaded Provenance Actions
align_utils-2.0.0.tar.gz 28.5 kB Without provenance Details for align_utils-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for align-utils 2.0.0
File Interpreter ABI Platform Actions
align_utils-2.0.0-py3-none-any.whl Python 3 none any Details for align_utils-2.0.0-py3-none-any.whl

Total release size: 48.4 kB

Release files / align_utils-2.0.0.tar.gz

Download URL align_utils-2.0.0.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7bad558d98d4c729dd3638320e6383c3f4f0f83e4f4f67737949da7f69554924
BLAKE2b-256 checksum
How to use checksums
43bcd52d28ce9f6549fa48bcfbe68d17fea05aafc74a7a5a08e42d07ece31e2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / align_utils-2.0.0-py3-none-any.whl

Download URL align_utils-2.0.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e8a6bb2c223d6e7b17f0f08bf803b8e8c2d4d0c0b82885c41d44f8dac60a435
BLAKE2b-256 checksum
How to use checksums
17165e528fef1253df51ded07dfad6be097b6f0c6f5e3d2a1c893e044497f699
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for align-utils 2.0.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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