Skip to content

Commit 7fdc01e

Browse files
committed
launcher: ship base.yaml next to the EXP_DIR config copy
Overlay configs inherit via 'defaults: base.yaml', resolved relative to the config file's directory; the run executes from the EXP_DIR copy, so the base must be copied alongside it.
1 parent b8d4032 commit 7fdc01e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

examples/configs/recipes/multi_lora/sft_8gpu_native.slurm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ done
5656
mkdir -p "${HF_HOME_HOST}"
5757

5858
cp -f "${CFG_ABS}" "${EXP_DIR}/config.yaml"
59+
# Recipe configs inherit via `defaults: base.yaml` (resolved relative to the
60+
# config file's own directory). The run executes from the EXP_DIR copy, so the
61+
# base must travel with it.
62+
CFG_DIR_SRC="$(dirname -- "${CFG_ABS}")"
63+
if grep -qE '^defaults:' "${CFG_ABS}" && [[ -f "${CFG_DIR_SRC}/base.yaml" ]]; then
64+
cp -f "${CFG_DIR_SRC}/base.yaml" "${EXP_DIR}/base.yaml"
65+
fi
5966

6067
INNER_CMD="
6168
set -eoux pipefail

0 commit comments

Comments
 (0)