Skip to content

Commit bed89ac

Browse files
edyoshikunclaude
andcommitted
config(dynaclr): pin TMPDIR/WANDB_DIR in gut launchers
W&B logs sample-image grids by writing PNGs to a temp dir under $TMPDIR before upload. On some SLURM nodes the default /tmp is per-job and gets swept mid-run, so validation image logging crashed with FileNotFoundError: .../wandb-media/*.png (training itself was fine — the run reached epoch 3). Pin TMPDIR and WANDB_DIR to persistent paths under MODEL_ROOT that the launcher creates, so the media temp dir can't vanish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bdf4a49 commit bed89ac

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

applications/dynaclr/configs/training/DynaCLR-3D/DynaCLR-3D-Gut-BagOfChannels.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ export MODEL_ROOT="${MODEL_ROOT:-${WORKSPACE_DIR}/models}"
2828
# Point at the dynaclr-pinned venv in your clone (avoids the shared .venv sync race).
2929
export UV_PROJECT_ENVIRONMENT="${UV_PROJECT_ENVIRONMENT:-${WORKSPACE_DIR}/.venv-dynaclr}"
3030

31+
# W&B writes sample images to a temp dir under $TMPDIR before upload. On some
32+
# SLURM nodes the default /tmp is per-job and gets swept mid-run, causing
33+
# `FileNotFoundError: .../wandb-media/*.png` at validation image logging. Pin
34+
# TMPDIR + WANDB_DIR to persistent paths we create so they can't disappear.
35+
export TMPDIR="${TMPDIR:-${MODEL_ROOT}/tmp}"
36+
export WANDB_DIR="${WANDB_DIR:-${MODEL_ROOT}/wandb}"
37+
mkdir -p "$TMPDIR" "$WANDB_DIR"
38+
3139
# The shared trainer recipe logs to the `computational_imaging` W&B entity. Set
3240
# WANDB_ENTITY to your own entity to log there instead (EXTRA_ARGS overrides the
3341
# recipe). Leave unset to keep the default.

applications/dynaclr/configs/training/DynaCLR-3D/DynaCLR-3D-Gut-MultiChannel.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ export CONFIGS="applications/dynaclr/configs/training/DynaCLR-3D/DynaCLR-3D-Gut-
2525
export MODEL_ROOT="${MODEL_ROOT:-${WORKSPACE_DIR}/models}"
2626
export UV_PROJECT_ENVIRONMENT="${UV_PROJECT_ENVIRONMENT:-${WORKSPACE_DIR}/.venv-dynaclr}"
2727

28+
# W&B writes sample images to a temp dir under $TMPDIR before upload. On some
29+
# SLURM nodes the default /tmp is per-job and gets swept mid-run, causing
30+
# `FileNotFoundError: .../wandb-media/*.png` at validation image logging. Pin
31+
# TMPDIR + WANDB_DIR to persistent paths we create so they can't disappear.
32+
export TMPDIR="${TMPDIR:-${MODEL_ROOT}/tmp}"
33+
export WANDB_DIR="${WANDB_DIR:-${MODEL_ROOT}/wandb}"
34+
mkdir -p "$TMPDIR" "$WANDB_DIR"
35+
2836
# The shared trainer recipe logs to the `computational_imaging` W&B entity. Set
2937
# WANDB_ENTITY to your own entity to log there instead. Leave unset for default.
3038
if [ -n "${WANDB_ENTITY:-}" ]; then

0 commit comments

Comments
 (0)