-
Notifications
You must be signed in to change notification settings - Fork 1.4k
ci: add pip/pre-commit cache and fix mirror override in NPU CI #9320
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||||
| if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then | ||||||||
| # pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple | ||||||||
| pip install -r requirements/tests.txt -i https://mirrors.aliyun.com/pypi/simple/ | ||||||||
| pip install -r requirements/tests.txt | ||||||||
| git config --global --add safe.directory /ms-swift | ||||||||
| git config --global user.email tmp | ||||||||
| git config --global user.name tmp.com | ||||||||
|
|
@@ -20,8 +20,8 @@ if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then | |||||||
| fi | ||||||||
| fi | ||||||||
|
|
||||||||
| pip install -r requirements/framework.txt -U -i https://mirrors.aliyun.com/pypi/simple/ | ||||||||
| pip install decord einops -U -i https://mirrors.aliyun.com/pypi/simple/ | ||||||||
| pip install -r requirements/framework.txt -U | ||||||||
| pip install decord einops -U | ||||||||
|
Comment on lines
+23
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two
Suggested change
|
||||||||
| pip uninstall autoawq -y | ||||||||
| pip install optimum | ||||||||
| pip install diffusers | ||||||||
|
|
@@ -30,7 +30,7 @@ if [ "$MODELSCOPE_SDK_DEBUG" == "True" ]; then | |||||||
|
|
||||||||
| # test with install | ||||||||
| pip install . | ||||||||
| pip install auto_gptq bitsandbytes deepspeed -U -i https://mirrors.aliyun.com/pypi/simple/ | ||||||||
| pip install auto_gptq bitsandbytes deepspeed -U | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding error handling here ensures that the script does not proceed to run the tests if these dependencies fail to install, which helps in identifying environment setup issues early and prevents running tests in an incomplete environment.
Suggested change
|
||||||||
| else | ||||||||
| echo "Running case in release image, run case directly!" | ||||||||
| fi | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is recommended to add error handling to the
pip installcommand. Without it, if the installation of test dependencies fails, the script will continue to subsequent steps (likepre-commit), which may lead to misleading failures or unreliable test results in CI.