Skip to content

[ci] introduce uv to accelerate pip install#9297

Open
KadenZhang3321 wants to merge 1 commit into
modelscope:mainfrom
KadenZhang3321:ci/introduce-uv-to-accelerate-pip-install
Open

[ci] introduce uv to accelerate pip install#9297
KadenZhang3321 wants to merge 1 commit into
modelscope:mainfrom
KadenZhang3321:ci/introduce-uv-to-accelerate-pip-install

Conversation

@KadenZhang3321
Copy link
Copy Markdown

@KadenZhang3321 KadenZhang3321 commented May 9, 2026

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support
  • CI

PR information

Integrate uv to significantly accelerate pip install in CI workflows. Replace pip install with uv pip install in lint.yaml and publish.yaml.

Changes

  • lint.yamlpip install pre-commitpip install uv + uv pip install pre-commit
  • publish.yamlpip install wheel/twine/...uv pip install with pip install uv added

Files not modified (no pip install calls):

  • citest.yaml — pip install happens inside docker container
  • citest_npu.yaml — pip install happens inside docker container

Experiment results

N/A — CI infrastructure change only. Effect can be verified by comparing workflow run durations.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@KadenZhang3321 KadenZhang3321 force-pushed the ci/introduce-uv-to-accelerate-pip-install branch from c7da135 to acba889 Compare May 11, 2026 03:48
@KadenZhang3321
Copy link
Copy Markdown
Author

@gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request transitions the CI environment from standard pip to uv for faster package installation. The changes involve updating .dev_scripts/ci_container_test.sh to use uv pip install and modifying .dev_scripts/dockerci.sh to pass relevant UV_ environment variables into the test containers. Feedback suggests providing default values for UV_INDEX_URL and UV_SYSTEM_PYTHON to ensure the script remains functional and performant, as well as using a mirror for the initial uv installation to avoid potential network issues during bootstrapping.

Comment thread .dev_scripts/dockerci.sh Outdated
Comment thread .dev_scripts/dockerci.sh Outdated
Comment thread .dev_scripts/ci_container_test.sh
@KadenZhang3321 KadenZhang3321 force-pushed the ci/introduce-uv-to-accelerate-pip-install branch 3 times, most recently from 67ffc6c to c288af0 Compare May 13, 2026 08:02
@Jintao-Huang
Copy link
Copy Markdown
Collaborator

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request transitions the CI environment to use uv for dependency management, replacing standard pip commands and adding relevant UV_* environment variables to the Docker configuration. The reviewer provided several actionable suggestions to optimize the setup, including combining multiple uv pip install commands to reduce overhead, using a mirror for the uv installation, and correcting a hardcoded debug flag that could lead to unnecessary re-installations during release image testing.

Comment thread .dev_scripts/dockerci.sh Outdated
Comment thread .dev_scripts/ci_container_test.sh
Comment thread .dev_scripts/ci_container_test.sh
Comment thread .dev_scripts/ci_container_test.sh
Comment thread .dev_scripts/ci_container_test.sh
@KadenZhang3321 KadenZhang3321 force-pushed the ci/introduce-uv-to-accelerate-pip-install branch 4 times, most recently from d92ab66 to cd4eec1 Compare May 14, 2026 07:56
@Jintao-Huang
Copy link
Copy Markdown
Collaborator

Hello, what is the purpose of this PR?

@KadenZhang3321 KadenZhang3321 force-pushed the ci/introduce-uv-to-accelerate-pip-install branch from cd4eec1 to f48f1c1 Compare May 15, 2026 06:25
@KadenZhang3321
Copy link
Copy Markdown
Author

Hello, what is the purpose of this PR?

Using UV installation as a replacement for the traditional pip installation can accelerate the installation process and achieve a certain effect. However, the CI (Continuous Integration) has been failing, making it difficult to see the specific improvement effects, then I am not sure if this replacement work for ms-swift. For reference, you can...sgl-project/sgl-kernel-npu#465
sgl-project/sglang#22029 .

@KadenZhang3321 KadenZhang3321 force-pushed the ci/introduce-uv-to-accelerate-pip-install branch from f48f1c1 to 912be6c Compare May 19, 2026 03:14
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.

2 participants