[AMD] Pin httpx>=0.25.0 to fix anthropic SDK socket_options error (#28869)
This commit is contained in:
@@ -72,6 +72,16 @@ install_with_retry() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The anthropic SDK passes `socket_options` to httpx.HTTPTransport, which only
|
||||||
|
# exists in httpx>=0.25.0. The CI image ships an older httpx, and several deps
|
||||||
|
# installed below (lmms-eval, aiter's requirements.txt, etc.) can pull a stale
|
||||||
|
# httpx back in, so test_anthropic_server fails with:
|
||||||
|
# TypeError: HTTPTransport.__init__() got an unexpected keyword argument 'socket_options'
|
||||||
|
# Call this as the LAST pip operation so nothing can downgrade httpx afterwards.
|
||||||
|
ensure_httpx() {
|
||||||
|
install_with_retry docker exec ci_sglang pip install --cache-dir=/sgl-data/pip-cache --upgrade 'httpx>=0.25.0'
|
||||||
|
}
|
||||||
|
|
||||||
# Helper function to git clone with retries
|
# Helper function to git clone with retries
|
||||||
git_clone_with_retry() {
|
git_clone_with_retry() {
|
||||||
local repo_url="$1"
|
local repo_url="$1"
|
||||||
@@ -212,6 +222,7 @@ if docker exec ci_sglang test -d /sgl-workspace/mori; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${SKIP_AITER_BUILD}" ]]; then
|
if [[ -n "${SKIP_AITER_BUILD}" ]]; then
|
||||||
|
ensure_httpx
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -332,6 +343,10 @@ fi
|
|||||||
|
|
||||||
echo "[CI-AITER-CHECK] === AITER VERSION CHECK END ==="
|
echo "[CI-AITER-CHECK] === AITER VERSION CHECK END ==="
|
||||||
|
|
||||||
|
# Must be the final pip operation: force httpx>=0.25.0 so the anthropic SDK can
|
||||||
|
# construct its httpx transport (see ensure_httpx definition above).
|
||||||
|
ensure_httpx
|
||||||
|
|
||||||
|
|
||||||
# # Clear pre-built AITER kernels from Docker image to avoid segfaults
|
# # Clear pre-built AITER kernels from Docker image to avoid segfaults
|
||||||
# # The Docker image may contain pre-compiled kernels incompatible with the current environment
|
# # The Docker image may contain pre-compiled kernels incompatible with the current environment
|
||||||
|
|||||||
Reference in New Issue
Block a user