Skip to content

Conversation

@sokovninn
Copy link
Contributor

@sokovninn sokovninn commented Jul 20, 2025

Purpose

Adds class reordering functionality to the LuxonisDataset to allow users to specify custom class ordering for tasks. This enables control over class-to-index mapping which is important for model consistency and deployment scenarios where specific class ordering is required.

Specification

  • Implemented set_class_order_per_task() method with validation:
    • Checks if task names exist in dataset
    • Validates that provided classes match dataset classes exactly
    • Only reorders when class order differs from current order
    • Provides clear warning messages when reordering occurs
  • Class reordering doesn't update dataset metadata on disk

Dependencies & Potential Impact

None / not applicable

Deployment Plan

None / not applicable

Testing & Validation

None / not applicable

kozlov721 and others added 20 commits July 5, 2024 19:43
@sokovninn sokovninn requested a review from a team as a code owner July 20, 2025 20:24
@sokovninn sokovninn requested review from conorsim, klemen1999, kozlov721 and tersekmatija and removed request for a team July 20, 2025 20:24
@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 20, 2025
@codecov
Copy link

codecov bot commented Jul 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.30%. Comparing base (ab8709e) to head (70d777d).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #351      +/-   ##
==========================================
+ Coverage   95.29%   95.30%   +0.01%     
==========================================
  Files         103      103              
  Lines        6328     6386      +58     
==========================================
+ Hits         6030     6086      +56     
- Misses        298      300       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sokovninn sokovninn requested a review from kozlov721 July 23, 2025 14:46
Copy link
Collaborator

@klemen1999 klemen1999 left a comment

Choose a reason for hiding this comment

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

LGTM but let's add some tests for it please

@sokovninn sokovninn changed the title Add class reordering in loader Add class reordering in dataset Jul 25, 2025
@sokovninn sokovninn merged commit 0b12b41 into main Jul 30, 2025
16 checks passed
@sokovninn sokovninn deleted the feat/class-reordering-in-loader branch July 30, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants