Skip to content

try to print server log#550

Merged
valarLip merged 5 commits intomainfrom
debugbug
Apr 15, 2026
Merged

try to print server log#550
valarLip merged 5 commits intomainfrom
debugbug

Conversation

@jiayyu
Copy link
Copy Markdown
Contributor

@jiayyu jiayyu commented Apr 13, 2026

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

Copilot AI review requested due to automatic review settings April 13, 2026 09:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to make ATOM server logs more visible in CI by reducing Python output buffering and streaming the server log during the accuracy and benchmark runs.

Changes:

  • Launch server with PYTHONUNBUFFERED=1 to improve real-time log flushing.
  • Stream /tmp/atom_server.log in the background during accuracy and benchmark modes, with cleanup on exit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 13, 2026 09:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jiayyu and others added 2 commits April 13, 2026 11:35
- Replace tee with file redirect + tail -f in launch to fix PID capture
  and eliminate SIGPIPE risk when docker exec session ends
- Add tail -f in launch section for real-time server log streaming
- Restore $RTL_CMD that was accidentally dropped
- Add kill $tail_pid after benchmark completes
- Add 'Dump server log' step (if: always()) to both accuracy and
  benchmark workflows as safety net for CI timeout scenarios
Copilot AI review requested due to automatic review settings April 15, 2026 06:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +35 to +37
PYTHONUNBUFFERED=1 $RTL_CMD python -m atom.entrypoints.openai_server --model "$MODEL_PATH" $PROFILER_ARGS "${EXTRA_ARGS[@]}" > "$ATOM_SERVER_LOG" 2>&1 &
atom_server_pid=$!
tail -f "$ATOM_SERVER_LOG" &
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tail -f "$ATOM_SERVER_LOG" & in the launch path can produce unbounded CI output during the potentially long health/warmup loops (up to ~35 minutes) and isn't cleaned up. Consider removing the background tail from launch, or limiting it (e.g., tail -n <N> -f), and ensure the tail process is terminated (trap/--pid=$atom_server_pid) so it can’t keep running if launch exits early.

Suggested change
PYTHONUNBUFFERED=1 $RTL_CMD python -m atom.entrypoints.openai_server --model "$MODEL_PATH" $PROFILER_ARGS "${EXTRA_ARGS[@]}" > "$ATOM_SERVER_LOG" 2>&1 &
atom_server_pid=$!
tail -f "$ATOM_SERVER_LOG" &
tail_pid=""
cleanup_atom_server_tail() {
if [ -n "${tail_pid:-}" ] && kill -0 "$tail_pid" 2>/dev/null; then
kill "$tail_pid" 2>/dev/null || true
wait "$tail_pid" 2>/dev/null || true
fi
}
trap cleanup_atom_server_tail EXIT
PYTHONUNBUFFERED=1 $RTL_CMD python -m atom.entrypoints.openai_server --model "$MODEL_PATH" $PROFILER_ARGS "${EXTRA_ARGS[@]}" > "$ATOM_SERVER_LOG" 2>&1 &
atom_server_pid=$!
tail -n 200 -f --pid="$atom_server_pid" "$ATOM_SERVER_LOG" &
tail_pid=$!

Copilot uses AI. Check for mistakes.
- name: Dump server log
if: always()
run: |
docker exec "$CONTAINER_NAME" cat /tmp/atom_server.log 2>/dev/null || true
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step prints the entire /tmp/atom_server.log file, which can get very large and overwhelm GitHub Actions logs. Consider printing only the last N lines (and/or only on failure) to keep logs readable and avoid hitting log size limits.

Suggested change
docker exec "$CONTAINER_NAME" cat /tmp/atom_server.log 2>/dev/null || true
docker exec "$CONTAINER_NAME" tail -n 200 /tmp/atom_server.log 2>/dev/null || true

Copilot uses AI. Check for mistakes.
- name: Dump server log
if: always()
run: |
docker exec atom-benchmark cat /tmp/atom_server.log 2>/dev/null || true
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step cats the full /tmp/atom_server.log, which may be very large and could exceed GitHub Actions log limits. Consider printing a bounded tail (e.g., last N lines) and/or gating it to failure-only to reduce noise.

Suggested change
docker exec atom-benchmark cat /tmp/atom_server.log 2>/dev/null || true
echo "Last 200 lines of /tmp/atom_server.log:"
docker exec atom-benchmark tail -n 200 /tmp/atom_server.log 2>/dev/null || true

Copilot uses AI. Check for mistakes.
- Server log: /tmp/atom_server.log (direct file write, no pipe)
- Client log: /tmp/atom_client.log (lm_eval/benchmark output via tee)
- Launch: tail -f for startup visibility with trap+kill cleanup on all
  exit paths (crash/timeout/warmup failure/success)
- Accuracy/benchmark: no tail -f, only client output visible in step
- Add "Dump server log" and "Dump client log" steps (if: always())
  to both workflows for post-hoc debugging
@valarLip valarLip merged commit 7249a75 into main Apr 15, 2026
25 of 29 checks passed
@valarLip valarLip deleted the debugbug branch April 15, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants