Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ShevchenkoRostyslav
Copy link
Contributor

@ShevchenkoRostyslav ShevchenkoRostyslav commented Aug 19, 2025

Hotfix: Preserve sequence types in __safe_serialize, add tests, and fix docs

Summary

  • Preserve original sequence types (list vs tuple) during safe serialization.
  • Add focused unit tests for __safe_serialize.
  • Strengthen multiframe E2E checks.
  • Fix documentation module reference.

Changes

  • src/iris/orchestration/output_builders.py
    • _nested_safe_serialize: return type(obj)(...) for lists/tuples instead of always list[...].
    • __safe_serialize: return type(object)(...) for lists/tuples instead of always list[...].
  • tests/unit_tests/orchestration/test_output_builders.py
    • Add TestSafeSerialize test suite (None, ImmutableModel, numpy array to list, list/tuple recursion with type preservation, primitive passthrough, unsupported type raises).
    • Access private serializer via getattr to avoid dunder name-mangling.
  • tests/e2e_tests/pipelines/test_e2e_multiframe_iris_pipeline.py
    • Assert individual_frames[0]["metadata"]["image_size"] is a tuple.
  • docs/source/_code_subpages/iris.pipelines.rst
    • Correct automodule reference from iris.pipelines.templates_aggregation_pipeline to iris.pipelines.multiframe_aggregation_pipeline.

Rationale

  • Avoid unintended type coercion (tuple → list) during serialization, ensuring API consistency (e.g., image_size remains a tuple).
  • Add regression coverage around serialization behavior.

Testing

  • Unit: tests/unit_tests/orchestration/test_output_builders.py passes.
  • E2E: strengthened assertion for multiframe pipeline metadata type.

Risk/Impact

  • Low. Behavior change is limited to preserving container type during serialization; otherwise non-breaking.

Type

  • Feature
  • Refactoring
  • Bugfix
  • DevOps
  • Testing

Checklist

  • I've made sure that my code works as expected by writing unit tests.
  • I've checked if my code doesn't generate warnings or errors.
  • I've performed a self-review of my code.
  • I've made sure that my code follows the style guidelines of the project.
  • I've commented hard-to-understand parts of my code.
  • I've made appropriate changes in the documentation.

@ShevchenkoRostyslav ShevchenkoRostyslav self-assigned this Aug 19, 2025
@ShevchenkoRostyslav ShevchenkoRostyslav requested a review from a team as a code owner August 19, 2025 15:31
@ShevchenkoRostyslav ShevchenkoRostyslav added the bugfix Something isn't working label Aug 19, 2025
@ShevchenkoRostyslav ShevchenkoRostyslav merged commit 28e5d44 into dev Aug 19, 2025
9 checks passed
@ShevchenkoRostyslav ShevchenkoRostyslav deleted the hotfix/output_builders_type branch August 19, 2025 15:39
@ShevchenkoRostyslav ShevchenkoRostyslav restored the hotfix/output_builders_type branch August 19, 2025 15:46
ShevchenkoRostyslav added a commit that referenced this pull request Aug 20, 2025
* 1.8.3 -> 1.9.0

* bugfix serialization data type

* add speciofic e2e test for multiframe

* revert the doc file from 1.9.0 releqase
ShevchenkoRostyslav added a commit that referenced this pull request Aug 20, 2025
* tets workflow

* upd

* add prod workflow

* correct the repo name

* upd name

* add a workflow to create docs

* address PR comments

* debugging

* add requirements

* upd deploy docs

* docs branch

* fix bug

* cleaning

* new way

* fake upd of docds

* upd

* upd

* rollback

* upd

* upd

* revert

* worktree

* another approach

* upd

* keep some files

* final version

* swap the order

* upd

* upd

* upd

* remove .buildinfo

* remove .buildinfo

* cleaning

* Iris multiview/aic 5901: e2e Multiframe Iris Pipeline  (#123)

* refactor multiframe iris pipeline

* refactor and fix tests

* fix test leakage from patches

* upd e2e tests

* fix broken tests

* rename MultiframeAggregationPipeline -> TemplatesAggregation

* Add user warning

* bump the iris version

* 1.8.3 -> 1.9.0 (#137)

Co-authored-by: ycbiometrics <[email protected]>

* Make sure that NodeWritterResult callback is always first in callbacks list of every node.

* Hotfix/output builders type (#139)

* 1.8.3 -> 1.9.0

* bugfix serialization data type

* add speciofic e2e test for multiframe

* revert the doc file from 1.9.0 releqase

* Hotfix/output builders type (#141)

* 1.8.3 -> 1.9.0

* release v1.9.0 (#136)

* tets workflow

* upd

* add prod workflow

* correct the repo name

* upd name

* add a workflow to create docs

* address PR comments

* debugging

* add requirements

* upd deploy docs

* docs branch

* fix bug

* cleaning

* new way

* fake upd of docds

* upd

* upd

* rollback

* upd

* upd

* revert

* worktree

* another approach

* upd

* keep some files

* final version

* swap the order

* upd

* upd

* upd

* remove .buildinfo

* remove .buildinfo

* cleaning

* Iris multiview/aic 5901: e2e Multiframe Iris Pipeline  (#123)

* refactor multiframe iris pipeline

* refactor and fix tests

* fix test leakage from patches

* upd e2e tests

* fix broken tests

* rename MultiframeAggregationPipeline -> TemplatesAggregation

* Add user warning

* bump the iris version

* 1.8.3 -> 1.9.0 (#137)

Co-authored-by: ycbiometrics <[email protected]>

---------

Co-authored-by: ycbiometrics <[email protected]>

* bugfix serialization data type

* add speciofic e2e test for multiframe

* revert the doc file from 1.9.0 releqase

* update iris version

* upd

---------

Co-authored-by: ycbiometrics <[email protected]>

---------

Co-authored-by: ycbiometrics <[email protected]>
Co-authored-by: Wiktor Łazarski <[email protected]>
ShevchenkoRostyslav added a commit that referenced this pull request Sep 1, 2025
* tets workflow

* upd

* add prod workflow

* correct the repo name

* upd name

* add a workflow to create docs

* address PR comments

* debugging

* add requirements

* upd deploy docs

* docs branch

* fix bug

* cleaning

* new way

* fake upd of docds

* upd

* upd

* rollback

* upd

* upd

* revert

* worktree

* another approach

* upd

* keep some files

* final version

* swap the order

* upd

* upd

* upd

* remove .buildinfo

* remove .buildinfo

* cleaning

* Iris multiview/aic 5901: e2e Multiframe Iris Pipeline  (#123)

* refactor multiframe iris pipeline

* refactor and fix tests

* fix test leakage from patches

* upd e2e tests

* fix broken tests

* rename MultiframeAggregationPipeline -> TemplatesAggregation

* Add user warning

* bump the iris version

* 1.8.3 -> 1.9.0 (#137)

Co-authored-by: ycbiometrics <[email protected]>

* Make sure that NodeWritterResult callback is always first in callbacks list of every node.

* Hotfix/output builders type (#139)

* 1.8.3 -> 1.9.0

* bugfix serialization data type

* add speciofic e2e test for multiframe

* revert the doc file from 1.9.0 releqase

* Hotfix/output builders type (#141)

* 1.8.3 -> 1.9.0

* release v1.9.0 (#136)

* tets workflow

* upd

* add prod workflow

* correct the repo name

* upd name

* add a workflow to create docs

* address PR comments

* debugging

* add requirements

* upd deploy docs

* docs branch

* fix bug

* cleaning

* new way

* fake upd of docds

* upd

* upd

* rollback

* upd

* upd

* revert

* worktree

* another approach

* upd

* keep some files

* final version

* swap the order

* upd

* upd

* upd

* remove .buildinfo

* remove .buildinfo

* cleaning

* Iris multiview/aic 5901: e2e Multiframe Iris Pipeline  (#123)

* refactor multiframe iris pipeline

* refactor and fix tests

* fix test leakage from patches

* upd e2e tests

* fix broken tests

* rename MultiframeAggregationPipeline -> TemplatesAggregation

* Add user warning

* bump the iris version

* 1.8.3 -> 1.9.0 (#137)

Co-authored-by: ycbiometrics <[email protected]>

---------

Co-authored-by: ycbiometrics <[email protected]>

* bugfix serialization data type

* add speciofic e2e test for multiframe

* revert the doc file from 1.9.0 releqase

* update iris version

* upd

---------

Co-authored-by: ycbiometrics <[email protected]>

* Preserve ndarray in safe serialization; bump IRIS to 1.9.2 (#145)

* fix: not to cast ndarray to list

* fix tests

* bump the version

* rollback docs

* Yichen1 aic 6094 pr for new interpolation fusion method (#144)

* improve the fusion methold on boundary extrapolation

* update more config files

* update unit tests

---------

Co-authored-by: ycbiometrics <[email protected]>

---------

Co-authored-by: ycbiometrics <[email protected]>
Co-authored-by: Wiktor Łazarski <[email protected]>
Co-authored-by: ycbiometrics <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants