Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ spec:
ulimit -s unlimited && \
ulimit -l unlimited && \
ulimit -a && \
LOG_FILE="/tmp/$(hostname).out" && \
composer \
--world_size {{ mul .Values.training.nodes .Values.training.gpusPerNode }} \
--node_rank $RANK \
Expand All @@ -55,6 +56,13 @@ spec:
{{- range $key, $value := .Values.yamlUpdates }}
{{ $key }}={{ $value }} \
{{- end }}
2>&1 | tee "$LOG_FILE"
EXIT_CODE=$?
{{- if .Values.logs.copyLogsDir }}
mkdir -p {{ .Values.logs.copyLogsDir }}
cp "$LOG_FILE" {{ .Values.logs.copyLogsDir }}/ || echo "Failed to copy logs"
{{- end }}
exit $EXIT_CODE
env:
{{- include "llm-training.nccl-env" . | nindent 12 }}
{{- include "llm-training.sharp-env" . | nindent 12 }}
Expand Down Expand Up @@ -118,6 +126,7 @@ spec:
ulimit -s unlimited && \
ulimit -l unlimited && \
ulimit -a && \
LOG_FILE="/tmp/$(hostname).out" && \
composer \
--world_size {{ mul .Values.training.nodes .Values.training.gpusPerNode }} \
--node_rank $RANK \
Expand All @@ -130,6 +139,13 @@ spec:
{{- range $key, $value := .Values.yamlUpdates }}
{{ $key }}={{ $value }} \
{{- end }}
2>&1 | tee "$LOG_FILE"
EXIT_CODE=$?
{{- if .Values.logs.copyLogsDir }}
mkdir -p {{ .Values.logs.copyLogsDir }}
cp "$LOG_FILE" {{ .Values.logs.copyLogsDir }}/ || echo "Failed to copy logs"
{{- end }}
exit $EXIT_CODE
env:
{{- include "llm-training.nccl-env" . | nindent 12 }}
{{- include "llm-training.sharp-env" . | nindent 12 }}
Expand Down
5 changes: 5 additions & 0 deletions examples/llm-foundry/aks/helm/llm-training/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ training:
kueue:
queueName: "" # e.g., "gpu-local-queue" to use Kueue

# Logs configuration (optional)
# Set copyLogsDir to save stdout/stderr logs to a directory
logs:
copyLogsDir: "" # e.g., "/mnt/logs" - logs saved as $(hostname).out

# Additional YAML updates for the training configuration
yamlUpdates: {}
# Example:
Expand Down