Skip to content

Commit 9f9f69e

Browse files
committed
not working yet
1 parent a68be97 commit 9f9f69e

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

.github/scripts/run_vllm_profiling.sh

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ setup_workspace() {
4343
# The Docker container has vLLM pre-installed, we shouldn't run from source
4444
cd /tmp/workspace
4545

46-
# Create the profiling directory if it doesn't exist
47-
mkdir -p "$(dirname "${VLLM_TORCH_PROFILER_DIR/#\~/$HOME}")" 2>/dev/null || true
46+
# Create the profiling directory (no need for tilde expansion now)
47+
echo "Creating profiling directory: ${VLLM_TORCH_PROFILER_DIR}"
48+
mkdir -p "${VLLM_TORCH_PROFILER_DIR}"
49+
50+
# Ensure the directory is writable
51+
chmod 755 "${VLLM_TORCH_PROFILER_DIR}"
4852
}
4953

5054
wait_for_server() {
@@ -131,14 +135,36 @@ main() {
131135
install_dependencies
132136
setup_workspace
133137

138+
# Debug: Show environment variables
139+
echo "DEBUG: VLLM_TORCH_PROFILER_DIR=${VLLM_TORCH_PROFILER_DIR:-not set}"
140+
134141
# Clean up any existing processes first
135142
kill_gpu_processes
136143

137144
# Main execution phase
138145
if start_vllm_server; then
139146
run_profiling
140147
cleanup_server
141-
echo "Profiling completed. Artifacts will be available in ${VLLM_TORCH_PROFILER_DIR:-default profiler directory}."
148+
149+
# Debug: Check if profiling files were created
150+
echo "DEBUG: Checking profiling directory: ${VLLM_TORCH_PROFILER_DIR}"
151+
if [ -d "${VLLM_TORCH_PROFILER_DIR}" ]; then
152+
echo "DEBUG: Profiling directory exists"
153+
ls -la "${VLLM_TORCH_PROFILER_DIR}" || echo "DEBUG: Directory is empty or inaccessible"
154+
find "${VLLM_TORCH_PROFILER_DIR}" -type f 2>/dev/null | head -10 | while read file; do
155+
echo "DEBUG: Found profiling file: ${file}"
156+
done
157+
else
158+
echo "DEBUG: Profiling directory does not exist!"
159+
fi
160+
161+
# Also check if any profiling files were created in current directory
162+
echo "DEBUG: Checking current directory for profiling artifacts:"
163+
find . -name "*.json" -o -name "*.trace" -o -name "*.pt" 2>/dev/null | head -5 | while read file; do
164+
echo "DEBUG: Found artifact in current dir: ${file}"
165+
done
166+
167+
echo "Profiling completed. Artifacts should be available in ${VLLM_TORCH_PROFILER_DIR:-default profiler directory}."
142168
else
143169
echo "Failed to start vLLM server. Exiting."
144170
exit 1

.github/workflows/vllm-profiling.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
DOCKER_IMAGE: ${{ env.DOCKER_IMAGE_PREFIX }}:${{ env.HEAD_SHA }}${{ env.DOCKER_IMAGE_SUFFIX }}
191191
# vLLM-related environment variables
192192
VLLM_USE_MODELSCOPE: false
193-
VLLM_TORCH_PROFILER_DIR: ~/vllm_profile
193+
VLLM_TORCH_PROFILER_DIR: /tmp/workspace/vllm/vllm_profile
194194
CUDA_VISIBLE_DEVICES: 0
195195
VLLM_USE_V1: 1
196196
# Profiling parameters
@@ -246,4 +246,4 @@ jobs:
246246
- uses: actions/upload-artifact@v4
247247
with:
248248
name: profiling-results--${{ env.DEVICE_TYPE }}
249-
path: ~/vllm_profile
249+
path: vllm/vllm_profile

0 commit comments

Comments
 (0)