Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
61eaa05
WIP - first attempt towards automatic batch casting
PawelPeczek-Roboflow Aug 20, 2025
0ffd261
WIP - first version kinda working e2e, yet not extensively tested
PawelPeczek-Roboflow Aug 21, 2025
ed2da81
Fix tests
PawelPeczek-Roboflow Aug 21, 2025
d328c1f
WIP - safe commit
PawelPeczek-Roboflow Aug 21, 2025
b72719c
Iterate to make decrease of dimensionality work
PawelPeczek-Roboflow Aug 22, 2025
9e7765a
Merge branch 'main' into feature/try-to-beat-the-limitation-of-ee-in-…
PawelPeczek-Roboflow Aug 22, 2025
fb704d3
WIP - testing blocks accepting compound inputs
PawelPeczek-Roboflow Aug 22, 2025
69ebbb1
WIP - testing blocks accepting compound inputs
PawelPeczek-Roboflow Aug 22, 2025
55211a2
Finish testing alignment of ABC with dimensionality manipulations
PawelPeczek-Roboflow Aug 22, 2025
c6a7ab5
Finish tests and adjustments for conditional execution
PawelPeczek-Roboflow Aug 22, 2025
c4b59cb
Make linters happy
PawelPeczek-Roboflow Aug 22, 2025
ac237f2
Clean up
PawelPeczek-Roboflow Aug 22, 2025
4cf7bb1
Fix issue with the dimensionality increase in terms of auto-batch-cas…
PawelPeczek-Roboflow Aug 22, 2025
546fad8
Add first part of changelog
PawelPeczek-Roboflow Aug 25, 2025
0b38378
Revert the order of EE changelog
PawelPeczek-Roboflow Aug 25, 2025
714d88c
Add first part of changelog
PawelPeczek-Roboflow Aug 25, 2025
2eb0ba3
⚡️ Speed up function `construct_simd_step_input` by 37% in PR #1504 (…
codeflash-ai[bot] Aug 25, 2025
831583a
Clarify docs and fix issue with input parameters not being broadcast …
PawelPeczek-Roboflow Aug 25, 2025
62460e9
Merge branch 'main' into feature/try-to-beat-the-limitation-of-ee-in-…
PawelPeczek-Roboflow Aug 25, 2025
37c120b
Merge pull request #1509 from roboflow/codeflash/optimize-pr1504-2025…
PawelPeczek-Roboflow Aug 25, 2025
32dd916
Merge branch 'main' into feature/try-to-beat-the-limitation-of-ee-in-…
PawelPeczek-Roboflow Aug 25, 2025
86d8787
Introduce output nesting for emergent dimensions
PawelPeczek-Roboflow Aug 26, 2025
25646cc
Resolve conflicts with main
PawelPeczek-Roboflow Aug 26, 2025
852fe54
Add more tests and clarify docs
PawelPeczek-Roboflow Aug 26, 2025
8355698
Add proper auth to integration tests
PawelPeczek-Roboflow Aug 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions inference/core/workflows/execution_engine/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
PARSED_NODE_INPUT_SELECTORS_PROPERTY = "parsed_node_input_selectors"
STEP_DEFINITION_PROPERTY = "definition"
WORKFLOW_INPUT_BATCH_LINEAGE_ID = "<workflow_input>"
TOP_LEVEL_LINEAGE_KEY = "top_level_lineage"
IMAGE_TYPE_KEY = "type"
IMAGE_VALUE_KEY = "value"
ROOT_PARENT_ID_KEY = "root_parent_id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,16 @@ def parse_block_manifest(
inputs_accepting_batches_and_scalars = set(
manifest_type.get_parameters_accepting_batches_and_scalars()
)
inputs_enforcing_auto_batch_casting = set(
manifest_type.get_parameters_enforcing_auto_batch_casting()
)
return parse_block_manifest_schema(
schema=schema,
inputs_dimensionality_offsets=inputs_dimensionality_offsets,
dimensionality_reference_property=dimensionality_reference_property,
inputs_accepting_batches=inputs_accepting_batches,
inputs_accepting_batches_and_scalars=inputs_accepting_batches_and_scalars,
inputs_enforcing_auto_batch_casting=inputs_enforcing_auto_batch_casting,
)


Expand All @@ -79,6 +83,7 @@ def parse_block_manifest_schema(
dimensionality_reference_property: Optional[str],
inputs_accepting_batches: Set[str],
inputs_accepting_batches_and_scalars: Set[str],
inputs_enforcing_auto_batch_casting: Set[str],
) -> BlockManifestMetadata:
primitive_types = retrieve_primitives_from_schema(
schema=schema,
Expand All @@ -89,6 +94,7 @@ def parse_block_manifest_schema(
dimensionality_reference_property=dimensionality_reference_property,
inputs_accepting_batches=inputs_accepting_batches,
inputs_accepting_batches_and_scalars=inputs_accepting_batches_and_scalars,
inputs_enforcing_auto_batch_casting=inputs_enforcing_auto_batch_casting,
)
return BlockManifestMetadata(
primitive_types=primitive_types,
Expand Down Expand Up @@ -255,6 +261,7 @@ def retrieve_selectors_from_schema(
dimensionality_reference_property: Optional[str],
inputs_accepting_batches: Set[str],
inputs_accepting_batches_and_scalars: Set[str],
inputs_enforcing_auto_batch_casting: Set[str],
) -> Dict[str, SelectorDefinition]:
result = []
for property_name, property_definition in schema[PROPERTIES_KEY].items():
Expand All @@ -277,6 +284,7 @@ def retrieve_selectors_from_schema(
is_list_element=True,
inputs_accepting_batches=inputs_accepting_batches,
inputs_accepting_batches_and_scalars=inputs_accepting_batches_and_scalars,
inputs_enforcing_auto_batch_casting=inputs_enforcing_auto_batch_casting,
)
elif property_definition.get(TYPE_KEY) == OBJECT_TYPE and isinstance(
property_definition.get(ADDITIONAL_PROPERTIES_KEY), dict
Expand All @@ -290,6 +298,7 @@ def retrieve_selectors_from_schema(
is_dict_element=True,
inputs_accepting_batches=inputs_accepting_batches,
inputs_accepting_batches_and_scalars=inputs_accepting_batches_and_scalars,
inputs_enforcing_auto_batch_casting=inputs_enforcing_auto_batch_casting,
)
else:
selector = retrieve_selectors_from_simple_property(
Expand All @@ -300,6 +309,7 @@ def retrieve_selectors_from_schema(
is_dimensionality_reference_property=is_dimensionality_reference_property,
inputs_accepting_batches=inputs_accepting_batches,
inputs_accepting_batches_and_scalars=inputs_accepting_batches_and_scalars,
inputs_enforcing_auto_batch_casting=inputs_enforcing_auto_batch_casting,
)
if selector is not None:
result.append(selector)
Expand All @@ -314,6 +324,7 @@ def retrieve_selectors_from_simple_property(
is_dimensionality_reference_property: bool,
inputs_accepting_batches: Set[str],
inputs_accepting_batches_and_scalars: Set[str],
inputs_enforcing_auto_batch_casting: Set[str],
is_list_element: bool = False,
is_dict_element: bool = False,
) -> Optional[SelectorDefinition]:
Expand All @@ -325,7 +336,10 @@ def retrieve_selectors_from_simple_property(
if property_name in inputs_accepting_batches_and_scalars:
points_to_batch = {True, False}
else:
points_to_batch = {property_name in inputs_accepting_batches}
points_to_batch = {
property_name in inputs_accepting_batches
or property_name in inputs_enforcing_auto_batch_casting
}
else:
points_to_batch = {declared_points_to_batch}
allowed_references = [
Expand Down Expand Up @@ -359,6 +373,7 @@ def retrieve_selectors_from_simple_property(
is_dimensionality_reference_property=is_dimensionality_reference_property,
inputs_accepting_batches=inputs_accepting_batches,
inputs_accepting_batches_and_scalars=inputs_accepting_batches_and_scalars,
inputs_enforcing_auto_batch_casting=inputs_enforcing_auto_batch_casting,
is_list_element=True,
)
if property_defines_union(property_definition=property_definition):
Expand All @@ -372,6 +387,7 @@ def retrieve_selectors_from_simple_property(
is_dimensionality_reference_property=is_dimensionality_reference_property,
inputs_accepting_batches=inputs_accepting_batches,
inputs_accepting_batches_and_scalars=inputs_accepting_batches_and_scalars,
inputs_enforcing_auto_batch_casting=inputs_enforcing_auto_batch_casting,
)
return None

Expand All @@ -394,6 +410,7 @@ def retrieve_selectors_from_union_definition(
is_dimensionality_reference_property: bool,
inputs_accepting_batches: Set[str],
inputs_accepting_batches_and_scalars: Set[str],
inputs_enforcing_auto_batch_casting: Set[str],
) -> Optional[SelectorDefinition]:
union_types = (
union_definition.get(ANY_OF_KEY, [])
Expand All @@ -410,6 +427,7 @@ def retrieve_selectors_from_union_definition(
is_dimensionality_reference_property=is_dimensionality_reference_property,
inputs_accepting_batches=inputs_accepting_batches,
inputs_accepting_batches_and_scalars=inputs_accepting_batches_and_scalars,
inputs_enforcing_auto_batch_casting=inputs_enforcing_auto_batch_casting,
is_list_element=is_list_element,
)
if result is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ def iterate_through_definitions(self) -> Generator[StepInputDefinition, None, No
StepInputData = Dict[str, Union[StepInputDefinition, CompoundStepInputDefinition]]


@dataclass
class AutoBatchCastingConfig:
casted_dimensionality: int
lineage_support: Optional[List[str]]


@dataclass
class StepNode(ExecutionGraphNode):
step_manifest: WorkflowBlockManifest
Expand All @@ -224,6 +230,9 @@ class StepNode(ExecutionGraphNode):
child_execution_branches: Dict[str, str] = field(default_factory=dict)
execution_branches_impacting_inputs: Set[str] = field(default_factory=set)
batch_oriented_parameters: Set[str] = field(default_factory=set)
auto_batch_casting_lineage_supports: Dict[str, AutoBatchCastingConfig] = field(
default_factory=dict
)
step_execution_dimensionality: int = 0

def controls_flow(self) -> bool:
Expand Down
Loading
Loading