labnotes 0.0.34__tar.gz → 0.0.35__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {labnotes-0.0.34 → labnotes-0.0.35}/PKG-INFO +1 -1
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/context.md +2 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/models.py +1 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/read_experiment_config.py +6 -2
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/run_experiment.py +6 -2
- {labnotes-0.0.34 → labnotes-0.0.35}/.gitignore +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/CHANGELOG.md +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/MIGRATIONS.md +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/README.md +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/pyproject.toml +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/__init__.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/asset_url.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/cell_progress.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/check_counts.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/cli.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/context_guide.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/count_runs.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/create_app.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/create_experiment.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/data_html.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/default_config_text.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/default_counts.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/drain_watch.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/experiment_notes.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/experiment_progress.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/experiment_runs.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/experiments.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/format_value.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/init.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/list_experiments.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/list_runs.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/load_config.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/load_experiment.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/notebook_kernel.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/output_html.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/parse_run_view.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/pivot_cells.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/print_rows.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/python_blocks.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/read_config.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/read_path.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/render_markdown.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/__init__.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/describe_event.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/execute_run.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/hold_folder.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/new_invocation_id.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/new_run_id.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/param_args.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/param_grid.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/plan_runs.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/run_folder.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/run_headless.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/runs_parent.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/shell_command.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/start_experiment.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/stop_then_kill.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/wait_for_group.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/runner/write_run_json.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/saved_outputs.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/serve_app.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/server.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/sort_href.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/sql_quote.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/static/labnotes.css +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/static/row-link.js +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/static/run-cell.js +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/static/view-toggle.js +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/stop_idle_kernels.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/summarize_config.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/__init__.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/experiment_rows.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/file_prefix.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/iso_time.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/list_experiment_runs.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/open_tables.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/path_glob.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/path_pattern.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/read_experiment.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/read_file.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/read_run.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tables/summarize_experiments.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/templates/base.html +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/templates/experiment.html +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/templates/index.html +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/templates/macros.html +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tui/__init__.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tui/dim.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tui/format_elapsed.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tui/run_app.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/src/labnotes/tui/run_tui.py +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/testing-conventions.toml +0 -0
- {labnotes-0.0.34 → labnotes-0.0.35}/uv.lock +0 -0
|
@@ -59,6 +59,8 @@ renaming the experiment means editing `name`.
|
|
|
59
59
|
Each combination of `[params]` runs `repeats` times, round-robin. Only runs
|
|
60
60
|
that count fill a combination, so running again fills in what failed or never
|
|
61
61
|
ran.
|
|
62
|
+
`mode = "adhoc"` skips that: every `run` runs each combination `repeats` times
|
|
63
|
+
again, whatever is already on disk. The default is `mode = "fill"`.
|
|
62
64
|
Each run gets a new run folder. `command` runs in a shell from the root, with
|
|
63
65
|
`{run_dir}` replaced by the run folder's absolute path. Pass it to the
|
|
64
66
|
script so it writes its outputs there.
|
|
@@ -5,7 +5,8 @@ from pathlib import Path
|
|
|
5
5
|
from labnotes.default_counts import DEFAULT_COUNTS
|
|
6
6
|
from labnotes.models import ExperimentConfig
|
|
7
7
|
|
|
8
|
-
SETTINGS = {"name", "command", "repeats", "params", "counts"}
|
|
8
|
+
SETTINGS = {"name", "command", "repeats", "params", "counts", "mode"}
|
|
9
|
+
MODES = ("fill", "adhoc")
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
def read_experiment_config(path: Path) -> ExperimentConfig:
|
|
@@ -39,4 +40,7 @@ def read_experiment_config(path: Path) -> ExperimentConfig:
|
|
|
39
40
|
counts = values.get("counts", DEFAULT_COUNTS)
|
|
40
41
|
if not isinstance(counts, str) or not counts.strip():
|
|
41
42
|
raise ValueError(f"{path}: counts must be a SQL condition")
|
|
42
|
-
|
|
43
|
+
mode = values.get("mode", "fill")
|
|
44
|
+
if mode not in MODES:
|
|
45
|
+
raise ValueError(f"{path}: mode must be fill or adhoc")
|
|
46
|
+
return ExperimentConfig(command, repeats, params, name, counts, mode)
|
|
@@ -31,8 +31,12 @@ async def run_experiment(
|
|
|
31
31
|
report: Report,
|
|
32
32
|
listen: Listen,
|
|
33
33
|
) -> list[dict[str, object]]:
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
finished: list[dict[str, object]] = []
|
|
35
|
+
match experiment.mode:
|
|
36
|
+
case "fill":
|
|
37
|
+
tables = open_tables(config)
|
|
38
|
+
existing = await list_experiment_runs(tables, name, experiment.counts)
|
|
39
|
+
finished = [json.loads(str(r["params"])) for r in existing if r["counted"]]
|
|
36
40
|
planned: set[str] = set()
|
|
37
41
|
|
|
38
42
|
def taken(run: str) -> bool:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|