iterative / dvc

🦉 ML Experiments and Data Management with Git
https://dvc.org
Apache License 2.0
13.36k stars 1.16k forks source link

fix(benchmarks): force older pygit2 for older DVC versions #10447

Closed shcheklein closed 3 weeks ago

shcheklein commented 3 weeks ago

Fixes (hopefully) failing benchmarks.

If you run it locally with:

DVC_TEST=true python -m pytest --benchmark-group-by func --dvc-revs 3.10.0 --pyargs dvc.testing.benchmarks.cli.commands.test_plots::test_plots --dataset mnist

and then:

(.venv) √ pytest-14/dvc-project0 % /private/var/folders/8f/fbysfztx1mb953_gpwl477p80000gn/T/pytest-of-ivan/pytest-14/dvc-venv-3.10.00/bin/dvc plots diff HEAD
ERROR: unexpected error - cannot import name 'GIT_OBJ_COMMIT' from 'pygit2' (/private/var/folders/8f/fbysfztx1mb953_gpwl477p80000gn/T/pytest-of-ivan/pytest-14/dvc-venv-3.10.00/lib/python3.12/site-packages/pygit2/__init__.py)

It's all related to:

https://github.com/iterative/scmrepo/pull/359