Skip to content

Make DeepLabCut an optional dependency to fix circular dependency issue#25

Open
deruyter92 wants to merge 4 commits intomainfrom
jaap/make_deeplabcut_optional
Open

Make DeepLabCut an optional dependency to fix circular dependency issue#25
deruyter92 wants to merge 4 commits intomainfrom
jaap/make_deeplabcut_optional

Conversation

@deruyter92
Copy link
Collaborator

@deruyter92 deruyter92 commented Mar 11, 2026

Description:
Make deeplabcut an optional dependency in fmpose3d to break the new circular dependency chain (deeplabcut[fmpose3d] -> fmpose3d -> deeplabcut).
This PR removes deeplabcut from core install requirements, adds it as an animals extra, updates DLC import paths to fail gracefully with clear install guidance when missing, and updates docs/tests accordingly.

Changes included:

  • Removed deeplabcut from base required dependencies in pyproject.toml.
  • Added a new optional extra for animal workflows: fmpose3d[animals] installs deeplabcut.
  • Unpin deeplabcut version -> make it a lower bound.
  • Updated animal-related DLC imports to be guarded and fail with a clear, actionable error message when DLC is not installed (including install hint).
  • Kept the human pipeline unaffected when DLC is absent.
  • Updated docs (README.md and fmpose3d/inference_api/README.md) to document optional installation for animal inference.
  • Updated tests/skip logic to handle environments without DLC more cleanly and verify the new missing-dependency error path.

This preserves existing animal functionality when the extra is installed, while removing the hard dependency edge that caused the cycle.

@deruyter92
Copy link
Collaborator Author

deruyter92 commented Mar 11, 2026

@xiu-cs, do you think we can replace the pinned DeepLabCut version to a more flexible one, e.g. only a lowerbound?
Might be more future-proof than pinning the required version to this specific pre-release

@xiu-cs xiu-cs closed this Mar 11, 2026
@xiu-cs xiu-cs reopened this Mar 11, 2026
@xiu-cs
Copy link
Collaborator

xiu-cs commented Mar 11, 2026

@xiu-cs, do you think we can replace the pinned DeepLabCut version to a more flexible one, e.g. only a lowerbound? Might be more future-proof than pinning the required version to this specific pre-release

Thanks! Previous I only tested the rc14 release version; other versions may also work.

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