Skip to content

Restore MMDetection evaluation datasets from pickled state - #3270

Open
dajiaohuang wants to merge 2 commits into
activeloopai:mainfrom
dajiaohuang:fix-mmdet-pickle-restore-3265
Open

dajiaohuang wants to merge 2 commits into
activeloopai:mainfrom
dajiaohuang:fix-mmdet-pickle-restore-3265

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Oct 7, 2026 •

Copy link
Copy Markdown

Impact: Bug fix. ### Description: Fixes #3265. Persist metrics_format and restore evaluator arguments from object state, removing bare local references that fail during validation or test dataset unpickling. Validation: git diff --check passed. No tests or builds were run per assignment. ### Things to be aware of: The fix is scoped to the reported call path and preserves the existing API. ### Things to worry about: Tests and runtime validation were not run. ### Additional Context: No additional dependency or migration changes.

Summary by CodeRabbit

  • Bug Fixes
    • Validation and test evaluators now retain the dataset’s restored configuration when recreated after loading a saved dataset.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9b3ccfaf-59be-4208-bcbb-15e1d8aa2021
📥 Commits

Reviewing files that changed from the base of the PR and between f432041 and 347ac5a.

📒 Files selected for processing (1)
  • python/deeplake/integrations/mmdet/mmdet_dataset_.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

MMDetDataset now includes metrics_format in its pickled state. When restoring validation or test mode, it uses restored instance attributes to reconstruct the evaluator.

Changes

MMDet dataset unpickling

Layer / File(s) Summary
Serialize state and rebuild evaluator
python/deeplake/integrations/mmdet/mmdet_dataset_.py
metrics_format is saved and restored. Validation/test evaluator reconstruction uses self.bbox_info, self.pipeline, self.metrics_format, and self.num_gpus.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 347ac

Validation and test dataset reconstruction now uses restored state, with no supported workflow failure established. The change appears mergeable subject to normal checks.

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (6 passed)
Check name Status Explanation
Description check ✅ Passed The description includes all required template sections, identifies the bug fix and issue, explains the technical change, and records validation limitations.
Linked Issues check ✅ Passed The description references and closes issue #3265, which matches the reported unpickling failure and the implemented fix.
Out of Scope Changes check ✅ Passed The changes are limited to the affected MMDetection dataset restoration path and preserve the existing API, with no unrelated dependency or migration changes reported.
Title check ✅ Passed The title clearly identifies the main change: restoring MMDetection evaluation datasets from pickled state.
Linked Issues check ✅ Passed The change addresses issue #3265. It persists metrics_format in object state. It restores self.bbox_info, self.pipeline, and self.num_gpus during validation and test dataset unpickling. It rem…
Out of Scope Changes check ✅ Passed The available whole-PR summary shows changes only in python/deeplake/integrations/mmdet/mmdet_dataset_.py. The changes support issue #3265 and preserve the public API. No unrelated dependency, migra…
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

I’m a rabbit with a dataset to pack,
I tuck metrics_format in the stack.
Restored fields guide the evaluator’s start,
With bbox and pipeline each playing their part.
I hop off with state all intact.

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

[BUG] MMDetection dataset unpickling references undefined state

1 participant