Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
test(execution): accept lazy nested stream rehydration
JPPhoto754864d5943d
diff --git a/tests/app/services/shared/test_execution_engine_differential.py b/tests/app/services/shared/test_execution_engine_differential.pyindex e714ce53b9..54ce83e2a7 100644--- a/tests/app/services/shared/test_execution_engine_differential.py+++ b/tests/app/services/shared/test_execution_engine_differential.py@@ -1714,6 +1714,16 @@ def _direct_iterate_fan_in_stream_projection(state: GraphExecutionState) -> tuplreturn tuple(sorted(streams))+def _assert_retained_iterate_streams_match_expected(+ resumed_state: GraphExecutionState, expected_state: GraphExecutionState+) -> None:+ """Rehydration may omit finalized streams that have no consumer after loading."""+ expected_streams = {stream[0]: stream for stream in _direct_iterate_fan_in_stream_projection(expected_state)}+ retained_streams = _direct_iterate_fan_in_stream_projection(resumed_state)+ assert {stream[0] for stream in retained_streams} <= expected_streams.keys()+ assert all(stream == expected_streams[stream[0]] for stream in retained_streams)++def _direct_iterate_fan_in_execution_ref_projection(state: GraphExecutionState, *, execution_ids: set[str] | None = None) -> tuple[Any, ...]:@@ -3295,9 +3305,7 @@ def test_three_level_nested_iterate_rehydrates_without_replay() -> None:assert partial_trace + resumed_trace == expected_traceassert resumed_state.is_complete()assert _state_projection(resumed_state) == _state_projection(expected_state)- assert _direct_iterate_fan_in_stream_projection(resumed_state) == _direct_iterate_fan_in_stream_projection(- expected_state- )+ _assert_retained_iterate_streams_match_expected(resumed_state, expected_state)def test_three_level_nested_iterate_failure_matches_compatibility() -> None:@@ -3421,9 +3429,7 @@ def test_four_level_nested_iterate_rehydrates_without_replay() -> None:assert partial_trace + resumed_trace == expected_traceassert resumed_state.is_complete()assert _state_projection(resumed_state) == _state_projection(expected_state)- assert _direct_iterate_fan_in_stream_projection(resumed_state) == _direct_iterate_fan_in_stream_projection(- expected_state- )+ _assert_retained_iterate_streams_match_expected(resumed_state, expected_state)def test_four_level_nested_iterate_failure_matches_compatibility() -> None:@@ -3525,9 +3531,7 @@ def test_five_level_nested_iterate_rehydrates_without_replay() -> None:assert partial_trace + resumed_trace == expected_traceassert resumed_state.is_complete()assert _state_projection(resumed_state) == _state_projection(expected_state)- assert _direct_iterate_fan_in_stream_projection(resumed_state) == _direct_iterate_fan_in_stream_projection(- expected_state- )+ _assert_retained_iterate_streams_match_expected(resumed_state, expected_state)def test_five_level_nested_iterate_failure_matches_compatibility() -> None: