Skip to content

dinov2: fix environment drift by pinning cuda-version=11.7 and deps#594

Open
piotr-bojanowski wants to merge 1 commit into
mainfrom
bojanowski-env
Open

dinov2: fix environment drift by pinning cuda-version=11.7 and deps#594
piotr-bojanowski wants to merge 1 commit into
mainfrom
bojanowski-env

Conversation

@piotr-bojanowski

Copy link
Copy Markdown
Member

Summary

This PR updates and stabilizes the conda.yaml environment used for DINOv2 training and evaluation.
The main goal is to improve reproducibility and avoid dependency drift/runtime mismatches while keeping the PyTorch 2.0 stack.

What changed

Updated base env to Python 3.10

Kept core stack aligned to:

  • pytorch==2.0.0
  • pytorch-cuda==11.7
  • torchvision==0.15.0

Added compatibility pins for stability:

  • mkl=2024.0.0
  • numpy<2
  • setuptools<81
  • cuda-version=11.7

Kept required runtime dependencies in env:

  • xformers==0.0.18
  • submitit
  • cuml

Why this is needed

During reproducibility testing, we hit environment-level issues including:

  • Torch import/runtime mismatch (iJIT_NotifyEvent) resolved by pinning MKL.
  • CUDA meta-package drift (cuda-version resolving to an unintended line) despite pytorch-cuda=11.7, resolved by explicitly pinning cuda-version=11.7.
  • torchmetrics==0.10.3 requiring pkg_resources availability, handled by pinning setuptools<81.
  • NumPy ABI compatibility warnings with NumPy 2.x, handled by pinning numpy<2.

This PR tightens the critical version boundaries so train/eval workflows are reproducible.

Validation

Verified successful environment creation and imports (torch, xformers, submitit, cuml).
Verified training runs complete with the updated environment.
Verified eval entrypoints run with the updated dependency set.

image image2

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 8, 2026
@patricklabatut

Copy link
Copy Markdown
Contributor

Ideally the requirements.txt would also be updated. Also suspect this update might break mmcv / mmseg support for the dense evaluations. Well, so be it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants