From 1c4a6c0d7d0a98859cc4d9f5ed4bb6da0de02585 Mon Sep 17 00:00:00 2001 From: Jonathan Schultz Date: Sat, 26 Sep 2026 04:53:32 +0000 Subject: [PATCH 1/9] fix(slurm): drop dead QUANTUI_RESULTS_DIR export from the sbatch template The template exported QUANTUI_RESULTS_DIR=/results and created that directory, but the batch worker never calls save_result() or list_results(); results reach History only when the app ingests the staging dir after the job ends, using the app's own results dir. The export only left an empty results/ folder in every staging dir. (M-JOBDIRS JD.9) Contributions: - Claude (Opus 5.5): code edits, review, and conceptual discussion - Jonathan Schultz: overall vision, planning, review, and orchestration Co-authored-by: Jonathan Schultz Co-authored-by: Claude Opus 5.5 --- quantui/backends/cluster_config.py | 2 -- quantui/backends/slurm.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/quantui/backends/cluster_config.py b/quantui/backends/cluster_config.py index 17ceaeb..fd7bfd6 100644 --- a/quantui/backends/cluster_config.py +++ b/quantui/backends/cluster_config.py @@ -150,8 +150,6 @@ def default_staging_root() -> Path: echo "Working directory: $(pwd)" export OMP_NUM_THREADS="${{SLURM_CPUS_PER_TASK:-{cores}}}" -export QUANTUI_RESULTS_DIR="{results_dir}" -mkdir -p "$QUANTUI_RESULTS_DIR" {worker_command} diff --git a/quantui/backends/slurm.py b/quantui/backends/slurm.py index 5333745..459d004 100644 --- a/quantui/backends/slurm.py +++ b/quantui/backends/slurm.py @@ -212,7 +212,6 @@ def _write_slurm_script( optional = "\n" + "\n".join(extra) if extra else "" worker_command = self._worker_command(request_path, staging_dir) - results_dir = staging_dir / "results" content = cfg.SLURM_SCRIPT_TEMPLATE.format( job_name=job_name, partition=self.partition, @@ -222,7 +221,6 @@ def _write_slurm_script( output_file=str(staging_dir / "slurm-%j.out"), error_file=str(staging_dir / "slurm-%j.err"), optional_directives=optional, - results_dir=str(results_dir), worker_command=worker_command, ) output_path.write_text(content) From 64ad26b9af57c3ea398ccec3f5cc1e91cf865502 Mon Sep 17 00:00:00 2001 From: Jonathan Schultz Date: Sat, 26 Sep 2026 04:58:47 +0000 Subject: [PATCH 2/9] feat(slurm): per-job dirs with attempt subdirs so reruns never overwrite M-JOBDIRS JD.2/JD.3/JD.4 (backend)/JD.8. - Each SLURM submission gets a readable job dir under the staging root, named