Skip to content

taipy.core.Sequence

Bases: _Entity, Submittable, _Labeled

List of Tasks and additional attributes representing a set of data processing elements connected as a direct acyclic graph.

Attributes:

Name Type Description
properties dict[str, Any]

A dictionary of additional properties.

tasks List[Task]

The list of Tasks.

sequence_id str

The Unique identifier of the sequence.

owner_id str

The identifier of the owner (scenario_id, cycle_id) or None.

parent_ids Optional[Set[str]]

The set of identifiers of the parent scenarios.

version str

The string indicates the application version of the sequence to instantiate. If not provided, the latest version is used.

get_label()

Returns the sequence simple label prefixed by its owner label.

Returns:

Type Description
str

The label of the sequence as a string.

get_parents()

Get parents of the sequence entity

get_simple_label()

Returns the sequence simple label.

Returns:

Type Description
str

The simple label of the sequence as a string.

submit(callbacks=None, force=False, wait=False, timeout=None, **properties)

Submit the sequence for execution.

All the Tasks of the sequence will be submitted for execution.

Parameters:

Name Type Description Default
callbacks List[Callable]

The list of callable functions to be called on status change.

None
force bool

Force execution even if the data nodes are in cache.

False
wait bool

Wait for the orchestrated jobs created from the sequence submission to be finished in asynchronous mode.

False
timeout Union[float, int]

The maximum number of seconds to wait for the jobs to be finished before returning.

None
**properties dict[str, any]

A keyworded variable length list of additional arguments.

{}

subscribe(callback, params=None)

Subscribe a function to be called on Job status change. The subscription is applied to all jobs created from the sequence's execution.

Parameters:

Name Type Description Default
callback Callable[[Sequence, Job], None]

The callable function to be called on status change.

required
params Optional[List[Any]]

The parameters to be passed to the callback.

None

unsubscribe(callback, params=None)

Unsubscribe a function that is called when the status of a Job changes.

Parameters:

Name Type Description Default
callback Callable[[Sequence, Job], None]

The callable function to unsubscribe.

required
params Optional[List[Any]]

The parameters to be passed to the callback.

None