Skip to content

fix(ci): refresh wandb in the CUDA test container setup - #9789

Merged
hjh0119 merged 1 commit into
modelscope:mainfrom
he-yufeng:fix/ci-wandb-protobuf7
Jul 28, 2026
Merged

fix(ci): refresh wandb in the CUDA test container setup#9789
hjh0119 merged 1 commit into
modelscope:mainfrom
he-yufeng:fix/ci-wandb-protobuf7

Conversation

@he-yufeng

Copy link
Copy Markdown
Contributor

The unittest job has been red on every PR since around July 14. #9744 reported it, and run 29903129982 on the latest main-facing PR shows the same failure: three test modules die at import with

ImportError: cannot import name 'Imports' from 'wandb.proto.wandb_telemetry_pb2'

The chain: the CI image bakes an old wandb, and the CUDA setup's pip install -r requirements/framework.txt -U pulls protobuf 7.35.1 in over it. The baked wandb's generated protobuf code does not work on protobuf 7.x, so import wandb inside swift/rlhf_trainers/utils.py blows up and takes test_ray_gkd, test_multi_teacher and test_assemble_teacher_topk_logprobs down with it. Those modules import the utils module for unrelated helpers; wandb is incidental.

Reproduced the mechanism locally: wandb 0.18.7 imports fine with protobuf 5.29.6, fails with cannot import name 'Deprecated' from wandb.proto.wandb_telemetry_pb2 once protobuf 7.35.1 is forced in, and wandb 0.28.1 imports cleanly with protobuf 7.35.1. So refreshing wandb in the setup script is enough. NPU CI is green and untouched.

Fixes #9744.

The framework install pulls protobuf 7.x into an image whose baked
wandb predates protobuf 7 support, so `import wandb` dies with
"cannot import name ... from wandb_telemetry_pb2" and the unittest
job fails at import time for every module touching
swift.rlhf_trainers.utils. Upgrade wandb so its generated protobuf
code matches the installed protobuf.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@he-yufeng

Copy link
Copy Markdown
Contributor Author

Bumping with fresh evidence that this is still biting: citest runs on current PRs are still failing through the same path this week (perf/megatron-channel-loss on 07-26, fsdp2_npu on 07-24), and main's container setup still carries no wandb refresh, so the old image wandb keeps colliding with the protobuf that the framework install pulls in. This PR's fix is one line in the setup script and was verified locally against the same ImportError chain. Happy to re-verify against the newest image if a maintainer can point me at its tag.

@hjh0119
hjh0119 merged commit 72a579e into modelscope:main Jul 28, 2026
2 of 3 checks passed
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.

Import bugs in unittests

3 participants