qat.core.config.descriptions module

class ClassDescription(**data)

Bases: NoExtraFieldsModel, Generic[T]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

config: dict
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

partial()

Returns a partially configured class

type: TypeVar(T)
class ClassDescription(**data)

Bases: NoExtraFieldsModel, Generic[T]

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

config: dict
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

partial()

Returns a partially configured class

type: TypeVar(T)
class CompilePipelineDescription(**data)

Bases: NoExtraFieldsModel

A description of a compile pipeline, which is a pipeline that can be used to compile a model into an executable.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

backend: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
construct(loader, engine=None)

Constructs and returns a CompilePipeline from its description

Parameters:

loader (BaseModelLoader) – The hardware model loader to fetch the hardware model.

Return type:

ConfigurableCompilePipeline

Returns:

The constructed pipeline

default: bool
frontend: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
hardware_loader: str | None
static is_subtype_of(ty)

Matches the type of the pipeline returned by the factory against the given type.

Return type:

bool

middleend: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
target_data: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
class EngineDescription(**data)

Bases: NoExtraFieldsModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

config: dict
construct(model=None)

Returns the described Engine instance, injecting the model if provided.

Return type:

NativeEngine

hardware_loader: str | None
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
type: Annotated[ImportString]
class ExecutePipelineDescription(**data)

Bases: NoExtraFieldsModel

A description of an executable pipeline, which is a pipeline that can be used to execute an executable.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

construct(loader, engine)

Constructs and returns a Pipeline from its description

Parameters:
Return type:

ConfigurableExecutePipeline

Returns:

The constructed pipeline

default: bool
engine: str | None
hardware_loader: str | None
static is_subtype_of(ty)

Matches the type of the pipeline returned by the factory against the given type.

Return type:

bool

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
results_pipeline: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
runtime: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
target_data: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
class HardwareLoaderDescription(**data)

Bases: NoExtraFieldsModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

config: dict
construct()

Returns the described Hardware Loader

Return type:

BaseModelLoader

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
type: Annotated[ImportString]
class PipelineClassDescription(**data)

Bases: NoExtraFieldsModel

Allows pipelines to be specified in a granular way and constructed as an updateable pipeline, allowing the hardware model to be refreshed.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

backend: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
construct(loader, engine=None)

Constructs and returns a Pipeline from its description

Parameters:
  • loader (BaseModelLoader) – The hardware model loader to fetch the hardware model.

  • engine (Optional[NativeEngine]) – The engine to use for the pipeline.

Return type:

ConfigurablePipeline

Returns:

The pipeline as a ConfigurablePipeline instance.

default: bool
engine: str | None
frontend: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
hardware_loader: str | None
static is_subtype_of(ty)

Matches the type of the pipeline returned by the factory against the given type.

Return type:

bool

middleend: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True, 'validate_default': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
results_pipeline: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
runtime: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
target_data: Union[Annotated[ImportString], Annotated[ClassDescription[Annotated[ImportString, AfterValidator]]]]
class PipelineFactoryDescription(**data)

Bases: NoExtraFieldsModel

A description pointing to a function that produces a pipeline, which is configured by a model, target data, an engine, and custom configuration.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

config: dict
construct(loader, engine=None)

Constructs and returns a Pipeline from its description

Parameters:
  • loader (BaseModelLoader) – The hardware model loader to fetch the hardware model.

  • engine (Optional[NativeEngine]) – The engine to use for the pipeline, optional.

Return type:

PipelineFactory

Returns:

The constructed pipeline

default: bool
engine: str | None
hardware_loader: str | None
is_subtype_of(ty)

Matches the type of the pipeline returned by the factory against the given type.

Return type:

bool

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
pipeline: Annotated[ImportString]
target_data: Optional[Annotated[ImportString]]
class PipelineInstanceDescription(**data)

Bases: NoExtraFieldsModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

construct()

Returns the requested Pipeline instance

Return type:

Pipeline

default: bool
is_subtype_of(ty)

Matches the type of the pipeline against the given type.

Return type:

bool

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
pipeline: Annotated[ImportString]
class UpdateablePipelineDescription(**data)

Bases: NoExtraFieldsModel

A description pointing to an updateable pipeline, which can be configured with a custom hardware model (loader), target data, and an engine. It also always custom configuration (given by the concrete updateable pipeline class).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

config: dict
construct(loader, engine=None)

Constructs and returns a Pipeline from its description

Parameters:
  • loader (BaseModelLoader) – The hardware model loader to fetch the hardware model.

  • engine (Optional[NativeEngine]) – The engine to use for the pipeline.

Return type:

UpdateablePipeline

Returns:

The updateable pipeline with a constructed pipeline instance.

default: bool
engine: str | None
hardware_loader: str | None
is_subtype_of(ty)

Matches the type of the pipeline returned by the factory against the given type.

Return type:

bool

model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str
pipeline: Annotated[ImportString]
target_data: Optional[Annotated[ImportString]]