Output¶
writer ¶
Write run outputs: CSV metadata, numpy arrays, and serialized models.
write_run_config ¶
Save a copy of the run configuration to the output directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config
|
RunConfig
|
Parsed configuration object. |
required |
output_dir
|
Path
|
Run output directory. |
required |
source_path
|
Path
|
Original YAML file path (copied verbatim when available). |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to the saved configuration file. |
write_assignments ¶
Save per-frame cluster assignments as a numpy array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
assignments
|
ndarray
|
Cluster label per frame. |
required |
output_dir
|
Path
|
Run output directory. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to |
write_cluster_model ¶
Serialize the fitted clustering model with joblib.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
object
|
Fitted clustering model. |
required |
output_dir
|
Path
|
Run output directory. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to |
write_cluster_statistics ¶
Write cluster population statistics to metadata.csv.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cluster_stats
|
dict
|
Per-cluster statistics. |
required |
output_dir
|
Path
|
Run output directory. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to |
write_seeds_csv ¶
Write selected seeds to seeds.csv.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seeds
|
iterable of SeedResult
|
Seed records for one policy. |
required |
output_dir
|
Path
|
Policy-specific output directory. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to |
write_combined_metadata ¶
Write a combined seed table across all policies.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
policy_seeds
|
dict
|
Mapping from policy name to seed lists. |
required |
output_dir
|
Path
|
Top-level results directory. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to |
write_policy_outputs ¶
write_policy_outputs(policy_name: str, seeds: List[SeedResult], cluster_stats: ClusterStats, results_dir: Path, include_cluster_metadata: bool = True) -> Path
Write all outputs for a single policy into its subdirectory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
policy_name
|
str
|
Policy identifier used as subdirectory name. |
required |
seeds
|
list of SeedResult
|
Seeds selected by the policy. |
required |
cluster_stats
|
dict
|
Global cluster statistics (same for all policies). Ignored when
|
required |
results_dir
|
Path
|
Top-level results directory. |
required |
include_cluster_metadata
|
bool
|
Whether to write per-policy cluster |
True
|
Returns:
| Type | Description |
|---|---|
Path
|
Policy output directory path. |
write_fast_scores ¶
Write FAST reward components to scores.csv.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scores
|
dict
|
Mapping from cluster ID to score components. |
required |
output_dir
|
Path
|
Policy-specific output directory. |
required |
Returns:
| Type | Description |
|---|---|
Path
|
Path to |
write_ma_reap_outputs ¶
write_ma_reap_outputs(scores: Dict[int, Dict[str, float]], weights: Dict[str, List[float]], stakes: Dict[int, Dict[str, float]], executors: Dict[int, str], agent_names: List[str], seeds: List[SeedResult], output_dir: Path) -> None
Write MA-REAP sidecar CSV files under the policy output directory.
write_maxent_vampnet_scores ¶
Write MaxEnt VAMPNet per-frame entropy scores to scores.csv.
write_ts_dar_scores ¶
Write TS-DAR per-frame OOD scores to scores.csv.
pdb_writer ¶
PDB export for selected seed frames using mdtraj.
write_seed_pdbs ¶
write_seed_pdbs(seeds: List[SeedResult], topology: Path, trajectory_map: Dict[int, Path], output_dir: Path) -> List[Path]
Extract coordinate frames and save each seed as a PDB file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seeds
|
list of SeedResult
|
Selected seed frames. |
required |
topology
|
Path
|
Topology file for mdtraj loading. |
required |
trajectory_map
|
dict
|
Mapping from |
required |
output_dir
|
Path
|
Directory where PDB files are written (typically |
required |
Returns:
| Type | Description |
|---|---|
list of Path
|
Paths to written PDB files. |