Fix hard-coded overwrite kwarg in pytorch analyze_videos - #3514
Merged
Merged
Conversation
Expose an `overwrite` option in the compatibility `analyze_videos` wrapper, document its PyTorch-only behavior, and pass it through so callers can re-run analysis even when prediction files already exist.
To avoid silently re-running on stale outputs when overwrite is true
2 tasks
2 tasks
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The public signature breaks trailing positional arguments, and the fix lacks regression coverage.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Fixes PyTorch video re-analysis by propagating the public overwrite option through analysis and tracklet generation.
Changes:
- Adds
overwriteto the compatibility API. - Forwards it to PyTorch analysis and automatic tracking.
File summaries
| File | Description |
|---|---|
deeplabcut/compat.py |
Exposes and forwards overwrite. |
deeplabcut/pose_estimation_pytorch/apis/videos.py |
Propagates overwrite to tracklet generation. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This change adds a regression test to ensure the compatibility wrapper passes the `overwrite` flag through to the PyTorch `analyze_videos` API. It fixes the bug where the flag was effectively pinned to `False` when using `Engine.PYTORCH`.
deruyter92
approved these changes
Sep 14, 2026
deruyter92
marked this pull request as ready for review
September 14, 2026 15:13
Collaborator
Author
Amazing, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes what appears to be hard-coded args from the original torch API, removing
overwrite=Falseand adding an upstream argument and docstring to the relevant function.Fixed for:
Closes #3513.