Skip to content
heliaAOT
HELIA HUB

defines

Machine-readable model

  • AttributeRulesetclassThis class defines a powerful and flexible way to customize the conversion process for specific entities in the model.
class

This class defines a powerful and flexible way to customize the conversion process for specific entities in the model.

helia_aot/attributes/defines.py:8

AttributeRuleset()

This class defines a powerful and flexible way to customize the conversion process for specific entities in the model.

Multiple attributes can be specified and allow slicing the model by entity type, entity identifier(s), or a specific combination of both.

The type field can be a specific entity type (e.g., CONV_2D) or * for all types. The id field can be a specific entity identifier or a list of identifiers.

Since multiple attributes can be applied to the same entity, precedence is given based on the pair:

  1. (1, 1) if both type and id are specified and match
  2. (1, 0) if type is specified and id is not
  3. (0, 1) if id is specified and type is not
  4. (0, 0) if neither is specified

Currently, if multiple attributes have the same precedence, the last one in the list will be used.

attribute

type

Python

helia_aot/attributes/defines.py:31

type: str = Field(default='*', description='Entity type (e.g. CONV_2D) or * for all')

The entity type (e.g. CONV_2D or PERSISTENT) or * for all.

attribute

id

Python

helia_aot/attributes/defines.py:32

id: str | list[str] | None = Field(default=None, description='Entity identifier(s)')

The entity identifier or list of identifiers.