Feat/luxonis eval object#8
Draft
klemen1999 wants to merge 9 commits into
Draft
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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.
Purpose
Summary
LuxonisEvalevaluation object so setup, evaluation, and cleanup are owned by a Python API instead of living entirely inside the CLI flow.eval_runinto a thin wrapper around the new object-based lifecycle.What Changed
luxonis_eval/core.pywithsetup(),evaluate(), andclose()methods, runtime component creation, compatibility checks, and structured result output.luxonis_eval/__main__.pysoeval_run(...)can accept config inputs directly, returns results, and always closes resources in afinallyblock.LuxonisEvalfromluxonis_eval/__init__.pyand updates the README Python API/docs to cover both one-shot usage and explicit lifecycle control.BaseEngineto use framework-managedsetup()plus subclass_setup_impl(), and replacesteardown()withclose().resolve_luxonis_loader_class_mapping()and builds metric contexts once during evaluator setup.class_index_mapis only applied when it actually exists, avoiding incorrect remapping inDiceCoefficient,MIoU, andTopKAccuracy.make_report_table()so rendering no longer mutates metric result dictionaries by removing the"metric"key.Migration Notes
_setup_impl()andclose()instead of the previoussetup()/teardown()contract.eval_run(...), but it now returns a structured results dictionary instead of being CLI-only.Specification
None / not applicable
Dependencies & Potential Impact
None / not applicable
Deployment Plan
None / not applicable
Testing & Validation
None / not applicable
AI Usage
Assisted-by: AGENT_NAME: Codex
Submitted code was reviewed by a human: YES
The author is taking the responsibility for the contribution: YES