Repository navigation
Fix Backend CI: add has_blackwell_gpu to the mlx worker test stub - #6980
Conversation
worker.py imports has_blackwell_gpu from utils.wheel_utils, but _load_worker_module stubs utils.wheel_utils with a fixed name tuple that omitted it, so loading the worker raised ImportError (cannot import name 'has_blackwell_gpu') and Backend CI could not collect test_mlx_training_worker_config.py. Add the name to the stub so it matches worker.py's imports.
There was a problem hiding this comment.
Code Review
This pull request updates the test configuration in test_mlx_training_worker_config.py by adding has_blackwell_gpu to the list of mocked worker module attributes. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c915657d7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for name in ( | ||
| "direct_wheel_url", | ||
| "flash_attn_wheel_url", | ||
| "has_blackwell_gpu", |
There was a problem hiding this comment.
Stub training_runs before loading worker
When this test module is collected in isolation, _load_worker_module() replaces utils with an empty package, and worker.py imports utils.training_runs before it reaches utils.wheel_utils. I ran pytest -q studio/backend/tests/test_mlx_training_worker_config.py and collection still fails with ModuleNotFoundError: No module named 'utils.training_runs', so adding only has_blackwell_gpu leaves Backend CI broken unless another test happened to prepopulate sys.modules['utils.training_runs'].
Useful? React with 👍 / 👎.
Summary
#6970 restored
has_blackwell_gpuinstudio/backend/utils/wheel_utils.pyand re-added its import instudio/backend/core/training/worker.py, but the mlx worker test's_load_worker_modulestubsutils.wheel_utilswith a fixed name tuple that did not includehas_blackwell_gpu. Loading the worker against that stub raisedImportError: cannot import name 'has_blackwell_gpu' from 'utils.wheel_utils' (unknown location), so Backend CI could not collectstudio/backend/tests/test_mlx_training_worker_config.pyon any of Python 3.10 to 3.13.This adds
has_blackwell_gputo the stub tuple so it matchesworker.py's imports, restoring the consistent state the file had before the name was dropped.Verification
cannot import name 'has_blackwell_gpu' from 'utils.wheel_utils' (unknown location).test_mlx_training_worker_config.pycollects and its tests pass (the one unrelated failure I saw locally is a bitsandbytes/CUDA setup issue on a GPU box; it does not occur under the CPU torch the Backend CI installs).worker.py,install_python_stack.py) that already listhas_blackwell_gpu.