Skip to content

Remove unused adapt_labeled_data_to_new_project from deeplabcut.utils - #3543

Merged
deruyter92 merged 1 commit into
DeepLabCut:devfrom
MohammadHijjawi97:remove-adapt-labeled-data-to-new-project
Oct 21, 2026
Merged

deruyter92 merged 1 commit into
DeepLabCut:devfrom
MohammadHijjawi97:remove-adapt-labeled-data-to-new-project

Conversation

@MohammadHijjawi97

Copy link
Copy Markdown
Contributor

Replacement for #3532, as discussed there with @C-Achard and @deruyter92.

deeplabcut.utils.conversioncode.adapt_labeled_data_to_new_project has no callers in the codebase and could not run as written (tqdm.tqdm(...) on the imported tqdm class). Rather than fixing it, the agreed decision in #3532 was to remove it: it is outdated, it would be risky once reachable (e.g. remove_old_bodyparts=True on a single-animal project drops every column and overwrites the CSV), and moving labeled data to a new project is now better handled by the napari-deeplabcut workflow.

Changes:

  • Remove adapt_labeled_data_to_new_project from deeplabcut/utils/conversioncode.py.
  • Drop the numpy, tqdm and deeplabcut imports that only this function used.

Note: the function was reachable as deeplabcut.utils.adapt_labeled_data_to_new_project via the star import in deeplabcut/utils/__init__.py, so this removes a technically public name. Per the discussion in #3532 it was not expected to be in use. A repo-wide search (docs, examples, tests) found no other references.

Checks:

  • pre-commit run --files deeplabcut/utils/conversioncode.py (ruff check/format pass)
  • python -c "import deeplabcut.utils" OK
  • pytest tests/test_conversioncode.py passes

The function had no callers and could not run (tqdm.tqdm on the tqdm class).
Per maintainer discussion in DeepLabCut#3532 it is removed rather than fixed. Also
drops the numpy, tqdm and deeplabcut imports that only it used.

@C-Achard C-Achard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @MohammadHijjawi97 !

@C-Achard C-Achard added the 3.0.3 label Oct 21, 2026
@deruyter92
deruyter92 merged commit 801c644 into DeepLabCut:dev Oct 21, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0.3 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants