Skip to navigation

aistore.sdk.wait_result

View as MarkdownOpen in Claude

Module Contents

Classes

NameDescription
WaitResultResult of waiting for a job to reach a desired state.

API

class aistore.sdk.wait_result.WaitResult(
job_id: str,
success: bool,
error: typing.Optional[str] = None,
end_time: typing.Optional[datetime.datetime] = None
)
Dataclass

Result of waiting for a job to reach a desired state.

end_time
Optional[datetime] = None

When the job ended, if any

error
Optional[str] = None

Error message, if any

job_id
str

The job ID

success
bool

True if the wait condition was met successfully

aistore.sdk.wait_result.WaitResult.__bool__() -> bool

Returns True if wait operation was successful.

aistore.sdk.wait_result.WaitResult.from_snapshots(
job_id: str,
snapshots: typing.List[aistore.sdk.types.JobSnap]
)
classmethod

Create a WaitResult from a list of job snapshots.

Parameters:

job_id
str

The job ID

snapshots
List[JobSnap]

List[ JobSnap ] — List of job snapshots from all target nodes

Returns:

WaitResult indicating success/failure based on snapshot states