-
Notifications
You must be signed in to change notification settings - Fork 3
Dev/slurm reliablity updates #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
193be54
dcfff1e
f80fdb8
52aa187
4466cb9
f69ed1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,210 @@ | ||||
| #!/usr/bin/env python3 | ||||
| """ | ||||
| Scan synth_out/res_* folders, read flowy_data_record.parquet, and report: | ||||
| - number of unique run_identifier values (per file + histogram) | ||||
| - maximum step value (per file + global max) | ||||
| - number of res_* folders found | ||||
|
|
||||
| Usage: | ||||
| python scan_flowy_data_record.py | ||||
| python scan_flowy_data_record.py --base /path/to/run | ||||
| """ | ||||
|
|
||||
| from __future__ import annotations | ||||
|
|
||||
| import argparse | ||||
| import glob | ||||
| import os | ||||
| from pathlib import Path | ||||
| from collections import Counter | ||||
|
|
||||
| import pandas as pd | ||||
|
|
||||
| # get env var | ||||
| DATA_DIR = os.getenv("DATA_DIR") | ||||
|
|
||||
| DEFAULT_BASE = ( | ||||
| f"{DATA_DIR}/output/" | ||||
| "multiplier_4bi_8bo_permuti_flowy/flowy_trans_run_12chains_3000steps_gen_iter0" | ||||
| ) | ||||
|
Comment on lines
+23
to
+29
|
||||
|
|
||||
|
|
||||
| def text_hist(counter: Counter[int], *, title: str, bar_width: int = 40) -> str: | ||||
| if not counter: | ||||
| return f"{title}\n (empty)\n" | ||||
|
|
||||
| items = sorted(counter.items(), key=lambda kv: kv[0]) | ||||
| max_count = max(counter.values()) | ||||
|
|
||||
| lines = [title] | ||||
| for k, c in items: | ||||
| bar_len = int(round((c / max_count) * bar_width)) if max_count > 0 else 0 | ||||
| bar = "#" * bar_len | ||||
| bar = '' | ||||
|
||||
| bar = '' |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |||||
| #SBATCH --output="/home/%u/slurm_logs/genial/sbatch_info/genial_flowy_%j_%N_$timestamp.log" | ||||||
| #SBATCH --error="/home/%u/slurm_logs/genial/sbatch_error/genial_flowy_%j_%N_$timestamp.log" | ||||||
| # Move to working directory | ||||||
| cd $$HOME/proj/genial | ||||||
| cd $$HOME/proj/GENIAL | ||||||
|
||||||
| cd $$HOME/proj/GENIAL | |
| cd "$HOME/proj/genial" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module docstring usage examples refer to
scan_flowy_data_record.py, but this file is namedcheck_flowy_data_records.py. Update the usage text so users can run the script as documented.