Skip to content

API Reference parrot_pipelines.planogram.layout

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_pipelines.planogram.layout

View source

Validated layout profiles and configuration overrides (FEAT-612).

Alias AnchorRule

Re-exported from parrot_pipelines.planogram.perception.slots.AnchorRule.

Alias CompletenessPolicy

Re-exported from parrot_pipelines.planogram.comparison.definition.CompletenessPolicy.

Alias IdentifyStrategy

Re-exported from parrot_pipelines.planogram.contracts.IdentifyStrategy.

Attribute LAYOUT_KEY

Class LayoutProfile

Strict, validated perception and identification settings; extra keys forbidden.

Fields:

Field Type Default Description
shape_profiles List[ShapeProfile]
anchor_rule AnchorRule AnchorRule.SHAPE_IS_SLOT
fill_gaps bool False
untagged_bottom_row bool False
definition_gap_fill bool False
tiered_shelves bool False
identify_strategy IdentifyStrategy IdentifyStrategy.FULL_IMAGE
perception_mode Literal['cv', 'llm_detector'] 'cv'
roi_detection bool True
roi_zone_labels List[str]
roi_product_labels Optional[str] None
min_usable_shapes int 1
min_row_items int 1
max_row_slope float 0.12
work_width int 2048
substrip_max_slots int 8
ocr_batch_size int 16
descriptor_fields List[str]
required_descriptor_fields List[str]
ocr_targets List[Literal['slot', 'tag', 'zone']]
references ReferencePolicy
reporting ReportingPolicy
completeness CompletenessPolicy
zone_selectors List[ZoneSelector]

Class ReferencePolicy

Bound and select references without using expected shelf identity.

Fields:

Field Type Default Description
enabled bool True
selection Literal['all', 'by_brand'] 'all'
max_per_call int 5
brand_by_reference Dict[str, str]

Alias ReportingPolicy

Re-exported from parrot_pipelines.planogram.comparison.definition.ReportingPolicy.

Alias ShapeKind

Re-exported from parrot_pipelines.planogram.contracts.ShapeKind.

Alias ShapeProfile

Re-exported from parrot_pipelines.planogram.perception.profiles.ShapeProfile.

Alias SlotsDefinition

Re-exported from parrot_pipelines.planogram.comparison.definition.SlotsDefinition.

Class ZoneSelector

Match observed zones, never invent them from an expected id.

Fields:

Field Type Default Description
zone_id str
profile Optional[str] None
kind Optional[str] None
ordinal Optional[int] None
region Optional[Tuple[float, float, float, float]] None
band Optional[Tuple[float, float]] None

Attribute logger

Function resolve_layout_profile

Merge and validate a config override without mutating its inputs.

resolve_layout_profile(defaults: LayoutProfile, config: dict[str, Any], *, config_name: str) -> LayoutProfile

Parameter Type Default Description
defaults LayoutProfile The planogram type's default profile.
config dict[str, Any] Raw planogram configuration containing optional profile overrides.
config_name str Name included in validation errors.

Returns: LayoutProfile — A new validated layout profile.

Raises:

  • ValueError — The override does not satisfy the layout-profile contract.

Function validate_zone_selectors

Validate selector ids and ambiguous repeated zone kinds against a definition.

validate_zone_selectors(profile: LayoutProfile, definition: SlotsDefinition, *, config_name: str) -> None

Parameter Type Default Description
profile LayoutProfile Validated configuration profile.
definition SlotsDefinition Loaded expected planogram definition.
config_name str Name included in validation errors.

Raises:

  • ValueError — A selector is dangling or repeated zone kinds lack selectors.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally