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 1.6.1

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 1.6.1
File Size Uploaded Provenance Actions
align_utils-1.6.1.tar.gz 26.9 kB Without provenance Details for align_utils-1.6.1.tar.gz

Built distribution (wheel)

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

Total release size: 45.6 kB

Release files / align_utils-1.6.1.tar.gz

Download URL align_utils-1.6.1.tar.gz
Size 26.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ef50c3c0d26a3f6cd42dcd948699ecdb0fea4d8c0597a1a233eacdbc2be05e36
BLAKE2b-256 checksum
How to use checksums
dae7ddaa3bc56c4fffa75487c2aebe76e8cc96d9c23258c56def6a1ab0525a11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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

Download URL align_utils-1.6.1-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a52a3b4608ae0e1dd21cb0f8ed4d7ccad37406788434355f75986f5edd329fcd
BLAKE2b-256 checksum
How to use checksums
52f4e1f3af1f24b154c294de50760090f6877a2e98a09fe202e255bc44759f2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for align-utils 1.6.1

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