| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
restore CI as in main
…eepLabCut into arash_and_jaap/uv_packaging
There was a problem hiding this comment.
This PR migrates DeepLabCut's packaging system from the traditional setup.py to a modern pyproject.toml-based configuration using uv as the package manager. The migration streamlines dependency management and follows current Python packaging best practices.
Changes:
Copilot reviewed 10 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file| File | Description |
|---|---|
| pyproject.toml | Complete package configuration with dependencies, optional extras, and platform-specific requirements |
| setup.py | Simplified to a compatibility shim that delegates to pyproject.toml |
| README.md | Updated installation instructions for both PyPI and source installations |
| .pre-commit-config.yaml | Replaced black with ruff for code formatting |
| .github/workflows/python-package.yml | Updated CI to install package directly instead of using requirements.txt |
| tools/update_license_headers.py | Removed obsolete developer tool |
| tools/README.md | Removed documentation for obsolete developer tools |
| testscript_cli.py | Removed obsolete test script |
| reinstall.sh | Removed obsolete installation script |
| dlc.py | Removed obsolete CLI entry point file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
- Edit pyproject.toml - Keep setup.py for backward compatibility
|
Note : re-added missing fmpose3D dependency |
Sorry, something went wrong.
Add temporary formatting configuration to pyproject.toml to standardize code style during linting changes. Includes a brief yapf config (based_on_style = "google", indent_width = 4) and isort settings (multi_line_output=3, include_trailing_comma=true, line_length=88, skip __init__.py, etc.). These settings are marked TODO and should be removed once the project linting is finalized.
There was a problem hiding this comment.
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)pyproject.toml:79
fmpose3d = ["fmpose3d"]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Functional tests started failing in CI without any repository-side dependency changes. The failure occurs during `deeplabcut.export_model()` when TensorFlow writes the graph, raising: TypeError: MessageToString() got an unexpected keyword argument 'float_format' This is consistent with transitive dependency drift in the runner image / resolver (e.g. ubuntu-latest / Python minor version changes) causing an incompatible protobuf runtime to be installed alongside TensorFlow, even though DeepLabCut itself is pinned to a commit.
|
Important : trying to run CI with pinned protobuf for functional tests, as functional tests started failing in CI without any repository-side dependency changes. The failure occurs during deeplabcut.export_model() when TensorFlow writes the graph, raising: This is likely due to dependency drift in the runner image / resolver (e.g. -latest / Python minor version changes) causing an incompatible protobuf runtime to be installed alongside TensorFlow, even though DeepLabCut itself is pinned to a commit. Note; trying with protobuf<7 seems to be successful so far. I tried to advertise the file clearly and only use it where necessary to minimize potential side-effects, but I would not call this future-proof either. |
Sorry, something went wrong.
This reverts commit 0002ced.
Add .github/versioning/tf-ci-constraints.txt to pin TensorFlow-related dependencies for CI. Update .github/workflows/python-package.yml to apply the constraints file for pip installs and install the package in editable mode (-e .) with the constraints before running example tests, replacing the previous git+https install. This ensures consistent TensorFlow/dependency versions and reproducible CI installs.
|
Maybe squashing this when merging would be cleaner. |
Sorry, something went wrong.
|
I'm helping out 3 (so far) other researchers who are having difficulties installing DLC after getting my own copy installed last week on my Windows 11 machine. Where do they install pytorch? Before or after any of these uv steps? uv sync --extra gui --python 3.11 Also, is this the way to install through a pyproject.toml or am I missing something? Do you know when the official installation instructions will be updated? |
Sorry, something went wrong.
|
Hello @amadorkane, Sorry for the continued trouble, the best would be to install pytorch between those two steps you listed; make sure to check their docs for GPU/CUDA support. uv sync --extra gui --python 3.11 uv pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu<CUDA_VER> # where CUDA_VER is the cuda version supported by your GPU uv run deeplabcut However you will need to clone the repo and install from the main branch to benefit from the pyproject.toml based install, and likely update napari to 0.6.6 manually (or install from the napari-DLC repo main branch by cloning). I understand this is complicated, and I apologize for the situation, but we are doing our best to fix this as soon as possible while ensuring we do not worsen the situation either. We are almost finished merging + releasing fixes across repositories, but currently the installation is problematic due to pinned versions in the napari-DLC dependencies. A release is staged but it will take a little longer for us to align everything; sorry again. Once we have this and ideally #3225 merged, we can finally make an easier-to-install rc release and update the docs. Best, |
Sorry, something went wrong.
|
Thank you very much Cyril! When I saw how many pages of dependencies there were after installation, I got the complexity of the problems you are up against! I am not sure how to do this: "clone the repo and install from the main branch". In #3219, I was advised to try: But that led to an error when doing the last step. The method that finally worked did not involved cloning the forked repo so I'm unclear how to do this part correctly still. Also, is the following correct for the additional napari steps? Also, uv sync --extra gui --python 3.11 uv pip3 install -v "napari==0.6.6" <-- correct? uv run deeplabcut |
Sorry, something went wrong.
|
Hello @amadorkane, Apologies for the delay, we are now nearly done with the release. In the meantime, my colleague @arashsm79 kindly suggested the following, which I edited a bit to work on Windows (in PowerShell) : mkdir dlc_project
cd dlc_project
uv venv -p 3.12 .dlc_venv
& .\.dlc_venv\Scripts\activate.ps1
uv pip install torch torchvision --torch-backend=cu<CUDA_VER>
uv pip install "deeplabcut[gui] @ git+https://github.com/deeplabcut/deeplabcut.git"
uv run -m deeplabcutNo cloning, should work out of the box, hopefully. For the CUDA_VER, check the nvidia-smi command output, in the upper right you will see something like : Please let me know if this worked, Best, |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Replacement PR for #3134 by @arashsm79
(cannot push changes to the original branch)
Summary
This PR modernizes how DLC specifies its dependencies and metadata, following latest standards for python packaging and allowing for modern build tools to be used for installation.
Introduces a pyproject.toml‑based configuration as the single source of truth for project metadata and dependencies, in line with current Python packaging standards (PEP 518 / PEP 621).
This does not change the package manager, nor does it require adopting any specific tool, though it is compatible with more modern installation methods. (pip, mamba, uv, conda, pdm...)
For example, uv is an extremely fast Python package and project manager that has seen incredible adoption from the Python community.
Here, the first steps are taken to allow DLC to be installed with modern package managers, such as uv, for different platforms and Python version.
The CI has also been updated accordingly to use uv.
The CI will be updated accordingly in a separate PR
Example UV install
Checkout this PR on a local copy of DLC.
Install uv
If you are not familiar with uv, you can take a look at their Getting Started page.
Run uv sync with the extra dependencies you may want for a quick install.
(Solves issues #3111 and similar)