Skip to content

Commit 8d45ce8

Browse files
committed
review comments
1 parent fb65db1 commit 8d45ce8

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

.github/scripts/run_vllm_profiling.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ run_profiling_tests() {
120120
ls -la "$test_name_directory" || echo "DEBUG: Directory is empty or inaccessible"
121121
find "$test_name_directory" -type f 2>/dev/null | head -10 | while read file; do
122122
echo "DEBUG: Found profiling file: ${file}"
123+
rename_profiling_file "$file" "vllm"
123124
done
124125
else
125126
echo "DEBUG: Profiling directory does not exist for test $TEST_NAME!"

.github/scripts/utilities.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,46 @@ check_hf_token() {
133133
echo "HF_TOKEN is set and valid."
134134
fi
135135
}
136+
137+
rename_profiling_file() {
138+
# Rename profiling files to standardized format
139+
# $1: file path to rename
140+
# $2: prefix name (e.g., "vllm", "sglang")
141+
local file="$1"
142+
local prefix_name="$2"
143+
144+
# Process .pt.trace.json.gz files
145+
if [[ "$file" == *.pt.trace.json.gz ]]; then
146+
local dir_path=$(dirname "$file")
147+
local basename_file=$(basename "$file")
148+
149+
# Determine new filename based on content
150+
local new_filename
151+
if [[ "$basename_file" == *".async_llm."* ]]; then
152+
new_filename="${prefix_name}.async_llm.pt.trace.json.gz"
153+
else
154+
new_filename="${prefix_name}.pt.trace.json.gz"
155+
fi
156+
157+
local new_filepath="${dir_path}/${new_filename}"
158+
159+
# Only rename if the new filename is different
160+
if [[ "$file" != "$new_filepath" ]]; then
161+
echo "DEBUG: Renaming ${file} to ${new_filepath}"
162+
mv "$file" "$new_filepath"
163+
if [[ $? -eq 0 ]]; then
164+
echo "DEBUG: Successfully renamed to ${new_filepath}"
165+
return 0
166+
else
167+
echo "DEBUG: Failed to rename ${file}"
168+
return 1
169+
fi
170+
else
171+
echo "DEBUG: File ${file} already has correct name"
172+
return 0
173+
fi
174+
else
175+
echo "DEBUG: Skipping non-profiling file: ${file}"
176+
return 0
177+
fi
178+
}

.github/workflows/vllm-profiling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ jobs:
223223
224224
UPLOAD_DATE=$(date -u +"%Y-%m-%d")
225225
echo "upload-date=${UPLOAD_DATE}" >> "${GITHUB_OUTPUT}"
226-
echo "s3-prefix=${REPOSITORY}/${UPLOAD_DATE}/${HEAD_SHA}" >> "${GITHUB_OUTPUT}"
226+
echo "s3-prefix=${UPLOAD_DATE}/${REPOSITORY}/${HEAD_SHA}/${GITHUB_RUN_ID}/${GITHUB_JOB}" >> "${GITHUB_OUTPUT}"
227227
228228
- name: Upload profiling results to S3
229229
uses: seemethere/upload-artifact-s3@v5

0 commit comments

Comments
 (0)