Skip to content

fix: override numpy<2 for megatron-core compatibility#565

Closed
vivekkalyan wants to merge 1 commit intomainfrom
fix/opencv-dep
Closed

fix: override numpy<2 for megatron-core compatibility#565
vivekkalyan wants to merge 1 commit intomainfrom
fix/opencv-dep

Conversation

@vivekkalyan
Copy link
Collaborator

@vivekkalyan vivekkalyan commented Feb 17, 2026

Summary

  • vLLM 0.15.1 (from feat: upgrade vLLM to 0.15.1 #561) pulls opencv-python-headless>=4.13 via mistral-common[image], which requires numpy>=2 on Python 3.9+
  • megatron-core (installed separately in the training environment) requires numpy<2.0.0
  • Adds override-dependencies = ["numpy<2"] in [tool.uv] to force numpy 1.26.4, resolving the conflict

Test plan

  • uv lock resolves cleanly (numpy 2.2.6 → 1.26.4)
  • uv run prek run --all-files passes locally
  • Verified on GPU VM: uv sync --extra backend installs numpy 1.26.4, vllm 0.15.1, opencv 4.13.0
  • Verified on GPU VM: bash src/art/megatron/setup.sh installs megatron-core 0.15.2 without conflicts
  • All packages import together successfully on the VM

vLLM 0.15.1 pulls opencv-python-headless>=4.13 which requires numpy>=2
on Python 3.9+, but megatron-core requires numpy<2. Add a uv
override-dependencies to cap numpy<2, resolving to 1.26.4. Verified on
GPU VM that LocalBackend and Megatron both install and import correctly.
@FurtherAI
Copy link
Collaborator

Seems this has been handled by #530

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

Comments