Skip to content

chore(tests): store semantic segmentation accuracy results in native format#610

Merged
tybulewicz merged 9 commits into
masterfrom
ttybulew/test_semantic_segmentation_results
Jun 22, 2026
Merged

chore(tests): store semantic segmentation accuracy results in native format#610
tybulewicz merged 9 commits into
masterfrom
ttybulew/test_semantic_segmentation_results

Conversation

@tybulewicz

@tybulewicz tybulewicz commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

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:

  • Added semantic-segmentation dump/compare helpers in test_accuracy.py and 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.json references to the new structured format for semantic segmentation entries.

Fixes #600

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@tybulewicz
tybulewicz requested a review from a team as a code owner June 22, 2026 07:35
@tybulewicz
tybulewicz requested a review from Copilot June 22, 2026 07:35
@github-actions github-actions Bot added tests Related to tests python python related changes labels Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.py and 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.json references 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.

Comment thread model_api/tests/accuracy/test_accuracy.py
Comment thread model_api/src/model_api/models/result/segmentation.py
Comment thread model_api/src/model_api/models/result/segmentation.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread model_api/tests/accuracy/test_accuracy.py
Comment thread model_api/tests/accuracy/test_accuracy.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@tybulewicz
tybulewicz enabled auto-merge June 22, 2026 08:42
@tybulewicz
tybulewicz added this pull request to the merge queue Jun 22, 2026
Merged via the queue into master with commit 0049531 Jun 22, 2026
33 checks passed
@tybulewicz
tybulewicz deleted the ttybulew/test_semantic_segmentation_results branch June 22, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python python related changes tests Related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Store Segmentation Models result in native format

3 participants