-
Notifications
You must be signed in to change notification settings - Fork 0
Validate tfLabelMap keys against actual TimePoint labelSet with informative warnings #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: keighrim <9062727+keighrim@users.noreply.github.com>
|
@copilot Instead of raise an error and die, issue a runtime warning. Also, warning msg must show the bidirectional set diffs. Once warning is sent, check the values of |
…apper Co-authored-by: keighrim <9062727+keighrim@users.noreply.github.com>
Changed to runtime warning with bidirectional set diffs and label_remapper cleanup in commit f445638. The warning now shows:
Invalid keys are removed from label_remapper after it's built, and processing continues instead of stopping. |
|
@copilot revise |
Co-authored-by: keighrim <9062727+keighrim@users.noreply.github.com>
Co-authored-by: keighrim <9062727+keighrim@users.noreply.github.com>
Summary
Removed redundant conditional check per code review feedback.
Changes Made
Modified:
app.py(Line 200)Removed the
if parameters['tfLabelMap']:check before the cleanup loop. This check was redundant because:tfLabelMapis empty,build_label_remapperreturns a dict mapping src_labels to themselves - no invalid keys existtfLabelMaphas only valid keys, the loop simply finds nothing to removetfLabelMaphas invalid keys, the loop removes themThe loop works correctly in all three cases without the conditional check.
Code Change
Testing
The cleanup loop is now simpler and more straightforward while maintaining the same functionality.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.