chore(tests): store semantic segmentation accuracy results in native format#610
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the accuracy-test “golden” format for semantic segmentation models so results are stored/compared in a native structured form (histogram + contour summaries) rather than relying on string serialization, addressing #600.
Changes:
- Added semantic-segmentation dump/compare helpers in
test_accuracy.pyand updated the accuracy test flow to use them. - Extended segmentation result types (
Contour,ImageResultWithSoftPrediction) with helpers (summarized_dict,hist) to support structured serialization. - Regenerated
public_scope.jsonreferences to the new structured format for semantic segmentation entries.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
model_api/tests/accuracy/test_accuracy.py |
Adds semantic segmentation dump/compare logic and threads dump through model creation/test comparisons. |
model_api/tests/accuracy/public_scope.json |
Updates stored reference outputs (notably semantic segmentation) to the new structured schema. |
model_api/src/model_api/models/result/segmentation.py |
Adds Contour.summarized_dict() and ImageResultWithSoftPrediction.hist() and updates string representations accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
tybulewicz
enabled auto-merge
June 22, 2026 08:42
mgumowsk
approved these changes
Jun 22, 2026
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.
What does this PR do?
This PR updates the accuracy-test “golden” format for semantic segmentation models so results are stored/compared in a native structured form (histogram + contour summaries) rather than relying on string serialization.
Changes:
test_accuracy.pyand updated the accuracy test flow to use them.Contour,ImageResultWithSoftPrediction) with helpers (summarized_dict,hist) to support structured serialization.public_scope.jsonreferences to the new structured format for semantic segmentation entries.Fixes #600
Before submitting