diff --git a/docs/developer/docker-serving.md b/docs/developer/docker-serving.md index 0241a4d..384457e 100644 --- a/docs/developer/docker-serving.md +++ b/docs/developer/docker-serving.md @@ -17,7 +17,7 @@ scripts/serve.sh preflight, Compose wrapper, lifecycle └── server.py --config /run/astrai/serve.yaml ``` -`scripts/tools/serve_runtime.py` reads `runtime:` plus the two container-side +`scripts/docker/serve_runtime.py` reads `runtime:` plus the two container-side values Compose needs (`server.port` for the port mapping, `server.device` for the preflight GPU check). `scripts/tools/server.py --config` reads `server:`. Explicit CLI arguments to `server.py` override `server:` YAML values. diff --git a/docs/developer/docker-training.md b/docs/developer/docker-training.md index 74ab421..57b8ee5 100644 --- a/docs/developer/docker-training.md +++ b/docs/developer/docker-training.md @@ -18,7 +18,7 @@ scripts/train.sh preflight, Compose wrapper, lifecycle, timer └── train.py --config /run/astrai/train.yaml ``` -The two parsers deliberately own different sections. `scripts/tools/train_runtime.py` +The two parsers deliberately own different sections. `scripts/docker/train_runtime.py` reads only `runtime`; `scripts/tools/train.py` reads only `model/data/parallel/training/ckpt/log`. Explicit trainer arguments after `--` override training YAML values. diff --git a/scripts/tools/serve_runtime.py b/scripts/docker/serve_runtime.py similarity index 100% rename from scripts/tools/serve_runtime.py rename to scripts/docker/serve_runtime.py diff --git a/scripts/tools/train_runtime.py b/scripts/docker/train_runtime.py similarity index 100% rename from scripts/tools/train_runtime.py rename to scripts/docker/train_runtime.py diff --git a/scripts/serve.sh b/scripts/serve.sh index b687764..ff77258 100644 --- a/scripts/serve.sh +++ b/scripts/serve.sh @@ -46,7 +46,7 @@ load_config() { die "PyYAML is required on the host (install python3-yaml)" local exports - exports="$(python3 "${ROOT_DIR}/scripts/tools/serve_runtime.py" exports "${CONFIG_FILE}")" || + exports="$(python3 "${ROOT_DIR}/scripts/docker/serve_runtime.py" exports "${CONFIG_FILE}")" || die "Failed to load runtime configuration" eval "${exports}" if [[ -n "${SERVE_JOB_NAME}" ]]; then @@ -113,7 +113,7 @@ runtime_environment_args() { local pair while IFS= read -r -d '' pair; do RUNTIME_ENV_ARGS+=(--env "${pair}") - done < <(python3 "${ROOT_DIR}/scripts/tools/serve_runtime.py" environment "${CONFIG_FILE}") + done < <(python3 "${ROOT_DIR}/scripts/docker/serve_runtime.py" environment "${CONFIG_FILE}") } start_server() { diff --git a/scripts/train.sh b/scripts/train.sh index 0b8cee5..8b78511 100755 --- a/scripts/train.sh +++ b/scripts/train.sh @@ -51,7 +51,7 @@ load_config() { die "PyYAML is required on the host (install python3-yaml)" local exports - exports="$(python3 "${ROOT_DIR}/scripts/tools/train_runtime.py" exports "${CONFIG_FILE}")" || + exports="$(python3 "${ROOT_DIR}/scripts/docker/train_runtime.py" exports "${CONFIG_FILE}")" || die "Failed to load runtime configuration" eval "${exports}" validate_job_name "${TRAIN_JOB_NAME}" @@ -148,7 +148,7 @@ runtime_environment_args() { local pair while IFS= read -r -d '' pair; do RUNTIME_ENV_ARGS+=(--env "${pair}") - done < <(python3 "${ROOT_DIR}/scripts/tools/train_runtime.py" environment "${CONFIG_FILE}") + done < <(python3 "${ROOT_DIR}/scripts/docker/train_runtime.py" environment "${CONFIG_FILE}") } start_training() { diff --git a/tests/test_serve_runtime.py b/tests/test_serve_runtime.py index 196f8a8..fe50c8f 100644 --- a/tests/test_serve_runtime.py +++ b/tests/test_serve_runtime.py @@ -2,7 +2,7 @@ import pytest -from scripts.tools.serve_runtime import load_runtime +from scripts.docker.serve_runtime import load_runtime def _write(tmp_path, body: str) -> str: