Skip to content

[CI] fix run_ci error in release/2.0.4 #3411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2025
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
26 changes: 23 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,29 @@ jobs:
gpu_id=0
DEVICES="0,1"
fi
FD_API_PORT=$((9180 + gpu_id * 100))
FD_ENGINE_QUEUE_PORT=$((9150 + gpu_id * 100))
FD_METRICS_PORT=$((9170 + gpu_id * 100))
FLASK_PORT=$((41068 + gpu_id * 100))
FD_API_PORT=$((41088 + gpu_id * 100))
FD_ENGINE_QUEUE_PORT=$((41058 + gpu_id * 100))
FD_METRICS_PORT=$((41078 + gpu_id * 100))
PORTS=($FLASK_PORT $FD_API_PORT $FD_ENGINE_QUEUE_PORT $FD_METRICS_PORT)
LOG_FILE="./port_cleanup_$(date +%Y%m%d_%H%M%S).log"
echo "==== LOG_FILE is ${LOG_FILE} ===="
echo "==== PORT CLEAN BEFORE TASK RUN ====" | tee -a $LOG_FILE
for port in "${PORTS[@]}"; do
PIDS=$(lsof -t -i :$port || true)
if [ -n "$PIDS" ]; then
echo "Port $port is occupied by PID(s): $PIDS" | tee -a $LOG_FILE
echo "$PIDS" | xargs -r kill -9
echo "Port $port cleared" | tee -a $LOG_FILE
else
echo "Port $port is free" | tee -a $LOG_FILE
fi
done
echo "==== PORT CLEAN COMPLETE ====" | tee -a $LOG_FILE
PARENT_DIR=$(dirname "$WORKSPACE")
echo "PARENT_DIR:$PARENT_DIR"
Expand Down
6 changes: 3 additions & 3 deletions scripts/run_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "$DIR"

python -m pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
python -m pip install paddlepaddle-gpu==3.1.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
python -m pip install -r requirements.txt
python -m pip install jsonschema aistudio_sdk==0.3.5
bash build.sh || exit 1
Expand All @@ -24,7 +24,7 @@ for subdir in "$run_path"*/; do
echo "------------------------------------------------------------"

set +e
timeout 360 python -m pytest --disable-warnings -sv "$file"
timeout 600 python -m pytest --disable-warnings -sv "$file"
exit_code=$?
set -e

Expand All @@ -44,7 +44,7 @@ for subdir in "$run_path"*/; do
if [ "$exit_code" -eq 1 ] || [ "$exit_code" -eq 124 ]; then
echo "[ERROR] $file 起服务或执行异常,exit_code=$exit_code"
if [ "$exit_code" -eq 124 ]; then
echo "[TIMEOUT] $file 脚本执行超过 6 分钟, 任务超时退出!"
echo "[TIMEOUT] $file 脚本执行超过 10 分钟, 任务超时退出!"
fi
fi

Expand Down
1 change: 1 addition & 0 deletions test/ci_use/EB_Lite/test_EB_Lite_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ def test_non_streaming_chat_with_min_tokens(openai_client, capsys):
model="default",
messages=[{"role": "user", "content": "Hello, how are you?"}],
temperature=1,
max_tokens=1010,
extra_body={"min_tokens": min_tokens},
stream=False,
)
Expand Down
10 changes: 5 additions & 5 deletions test/ci_use/EB_VL_Lite/test_EB_VL_Lite_serving.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ def setup_and_run_server():
start_new_session=True, # Enables killing full group via os.killpg
)

# Wait up to 300 seconds for API server to be ready
for _ in range(300):
# Wait up to 600 seconds for API server to be ready
for _ in range(600):
if is_port_open("127.0.0.1", FD_API_PORT):
print(f"API server is up on port {FD_API_PORT}")
break
time.sleep(1)
else:
print("[TIMEOUT] API server failed to start in 5 minutes. Cleaning up...")
print("[TIMEOUT] API server failed to start in 10 minutes. Cleaning up...")
try:
os.killpg(process.pid, signal.SIGTERM)
except Exception as e:
Expand Down Expand Up @@ -229,9 +229,9 @@ def test_consistency_between_runs(api_url, headers, consistent_payload):
# base result
base_path = os.getenv("MODEL_PATH")
if base_path:
base_file = os.path.join(base_path, "ernie-4_5-vl-base-tp2")
base_file = os.path.join(base_path, "ernie-4_5-vl-base-tp2-204")
else:
base_file = "ernie-4_5-vl-base-tp2"
base_file = "ernie-4_5-vl-base-tp2-204"
with open(base_file, "r") as f:
content2 = f.read()

Expand Down
Loading