labscheduler.sila_server.generated.schedulingservice package

Submodules

Module contents

labscheduler.sila_server.generated.schedulingservice.AlgorithmMetaData

alias of Any

exception labscheduler.sila_server.generated.schedulingservice.ComputationError(message: str | None = None)[source]

Bases: DefinedExecutionError

_abc_impl = <_abc._abc_data object>
class labscheduler.sila_server.generated.schedulingservice.ComputeSchedule_Responses(Result)[source]

Bases: NamedTuple

Result: Any

Returns the computed schedule together with a string whether the schedule is optimal, feasible or infeasible.

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('Result',)
classmethod _make(iterable)

Make a new ComputeSchedule_Responses object from a sequence or iterable

_replace(**kwds)

Return a new ComputeSchedule_Responses object replacing specified fields with new values

labscheduler.sila_server.generated.schedulingservice.Edge

alias of Any

exception labscheduler.sila_server.generated.schedulingservice.MissingAlgorithmError(message: str | None = None)[source]

Bases: DefinedExecutionError

_abc_impl = <_abc._abc_data object>
labscheduler.sila_server.generated.schedulingservice.Node

alias of Any

labscheduler.sila_server.generated.schedulingservice.RequiredResource

alias of Any

class labscheduler.sila_server.generated.schedulingservice.SchedulingServiceBase(parent_server: Server)[source]

Bases: FeatureImplementationBase, ABC

abstractmethod ComputeSchedule(WorkflowGraph: WorkflowGraph, MaxComputationTime: float, *, metadata: MetadataDict, instance: ObservableCommandInstance) ComputeSchedule_Responses[source]

Takes a workflow graph (see parameter description) and computes a schedule for the currently configured lab environment (LabConfigurationController) with the currently selected algorithm. You have to give the maximum computation time.

Parameters:
  • WorkflowGraph – The workflow graph of an experiment in the required SiLA structure.

  • MaxComputationTime – Maximum computation time in seconds

  • metadata – The SiLA Client Metadata attached to the call

  • instance – The command instance, enabling sending status updates to subscribed clients

Returns:

A tuple with: - The computed schedule - A string indicating whether the schedule is “optimal”, “feasible”, or “infeasible”

ComputeSchedule_default_lifetime_of_execution: timedelta | None
abstractmethod SelectAlgorithm(AlgorithmName: str, *, metadata: MetadataDict) SelectAlgorithm_Responses[source]

Selects the algorithm to be used in the ComputeSchedule command

Parameters:
  • AlgorithmName – Name of the Algorithm

  • metadata – The SiLA Client Metadata attached to the call

_abc_impl = <_abc._abc_data object>
abstractmethod get_AvailableAlgorithms(*, metadata: MetadataDict) list[AlgorithmMetaData][source]

List of algorithm info for all available algorithms

Parameters:

metadata – The SiLA Client Metadata attached to the call

Returns:

List of algorithm info for all available algorithms

abstractmethod get_CurrentAlgorithm(*, metadata: MetadataDict) AlgorithmMetaData[source]

The currently selected algorithm

Parameters:

metadata – The SiLA Client Metadata attached to the call

Returns:

The currently selected algorithm

parent_server: Server

SiLA Server serving this feature implementation

class labscheduler.sila_server.generated.schedulingservice.SchedulingServiceClient[source]

Bases: object

Provides an interface for the PythonLabOrchestrator or any other lab environment to interact with the scheduling module. It provides an observable command to schedule a workflow(exact syntax explained in command). You can choose between different algorithms as get their metadata.

AvailableAlgorithms: ClientUnobservableProperty[list[AlgorithmMetaData]]

List of algorithm info for all available algorithms

ComputeSchedule(WorkflowGraph: WorkflowGraph, MaxComputationTime: float, *, metadata: Iterable[ClientMetadataInstance] | None = None) ClientObservableCommandInstance[ComputeSchedule_Responses][source]

Takes a workflow graph (see parameter description) and computes a schedule for the currently configured lab

environment(LabConfigurationController) with the currently selected algorithm. You have to give the maximum computation time.

CurrentAlgorithm: ClientUnobservableProperty[AlgorithmMetaData]

The currently selected algorithm

SelectAlgorithm(AlgorithmName: str, *, metadata: Iterable[ClientMetadataInstance] | None = None) SelectAlgorithm_Responses[source]

Selects the algorithm to be used in the ComputeSchedule command

class labscheduler.sila_server.generated.schedulingservice.SelectAlgorithm_Responses[source]

Bases: NamedTuple

_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ()
classmethod _make(iterable)

Make a new SelectAlgorithm_Responses object from a sequence or iterable

_replace(**kwds)

Return a new SelectAlgorithm_Responses object replacing specified fields with new values

labscheduler.sila_server.generated.schedulingservice.WorkflowGraph

alias of Any