core.execution_state

Execution state management for parallel and batch execution.

Execution state management for parallel and batch execution.

class ExecutionState(completed=<factory>, in_progress=<factory>, pending=<factory>, results=<factory>, results_lock=<factory>, success_count=0, failed_count=0, skipped_count=0, aborted_count=0, results_by_name=<factory>, current_name='', aborted=False)[source]

Bases: object

Tracks state during parallel execution with thread-safe operations.

Parameters:
completed

Set of completed sequence numbers.

Type:

set[int]

in_progress

Set of currently executing sequence numbers.

Type:

set[int]

pending

Dict of pending PromptNodes by sequence number.

Type:

dict[int, ffai.core.prompt_node.PromptNode]

results

List of execution results.

Type:

list[dict[str, Any]]

results_lock

Thread lock for result access.

Type:

_thread.allocate_lock

success_count

Number of successful executions.

Type:

int

failed_count

Number of failed executions.

Type:

int

skipped_count

Number of skipped executions.

Type:

int

aborted_count

Number of aborted executions.

Type:

int

results_by_name

Results indexed by prompt name.

Type:

dict[str, dict[str, Any]]

current_name

Name of currently executing prompt.

Type:

str

aborted

Whether execution has been aborted.

Type:

bool

completed: set[int]
in_progress: set[int]
pending: dict[int, PromptNode]
results: list[dict[str, Any]]
results_lock: allocate_lock
success_count: int = 0
failed_count: int = 0
skipped_count: int = 0
aborted_count: int = 0
results_by_name: dict[str, dict[str, Any]]
current_name: str = ''
aborted: bool = False

Classes

class ExecutionState(completed=<factory>, in_progress=<factory>, pending=<factory>, results=<factory>, results_lock=<factory>, success_count=0, failed_count=0, skipped_count=0, aborted_count=0, results_by_name=<factory>, current_name='', aborted=False)[source]

Bases: object

Tracks state during parallel execution with thread-safe operations.

Parameters:
completed

Set of completed sequence numbers.

Type:

set[int]

in_progress

Set of currently executing sequence numbers.

Type:

set[int]

pending

Dict of pending PromptNodes by sequence number.

Type:

dict[int, ffai.core.prompt_node.PromptNode]

results

List of execution results.

Type:

list[dict[str, Any]]

results_lock

Thread lock for result access.

Type:

_thread.allocate_lock

success_count

Number of successful executions.

Type:

int

failed_count

Number of failed executions.

Type:

int

skipped_count

Number of skipped executions.

Type:

int

aborted_count

Number of aborted executions.

Type:

int

results_by_name

Results indexed by prompt name.

Type:

dict[str, dict[str, Any]]

current_name

Name of currently executing prompt.

Type:

str

aborted

Whether execution has been aborted.

Type:

bool

completed: set[int]
in_progress: set[int]
pending: dict[int, PromptNode]
results: list[dict[str, Any]]
results_lock: allocate_lock
success_count: int = 0
failed_count: int = 0
skipped_count: int = 0
aborted_count: int = 0
results_by_name: dict[str, dict[str, Any]]
current_name: str = ''
aborted: bool = False