aistore.sdk.dsort.core

View as MarkdownOpen in Claude

Module Contents

Classes

NameDescription
DsortClass for managing jobs for the dSort extension: https://github.com/NVIDIA/aistore/blob/main/docs/cli/dsort.md

API

class aistore.sdk.dsort.core.Dsort(
client: aistore.sdk.request_client.RequestClient,
dsort_id: str = ''
)

Class for managing jobs for the dSort extension: https://github.com/NVIDIA/aistore/blob/main/docs/cli/dsort.md

dsort_id
str

Return dSort job id

aistore.sdk.dsort.core.Dsort.abort()

Abort a dSort job

aistore.sdk.dsort.core.Dsort.get_job_info() -> typing.Dict[str, aistore.sdk.dsort.types.JobInfo]

Get info for a dsort job Returns: Dictionary of job info for all jobs associated with this dsort

aistore.sdk.dsort.core.Dsort.start(
spec: typing.Union[str, pathlib.Path, aistore.sdk.dsort.framework.DsortFramework]
) -> str

Start a dSort job with a provided spec file location or defined framework

Parameters:

spec
Union[str, Path, DsortFramework]

Path to the spec file or a DsortFramework instance

Returns: str

dSort job ID

aistore.sdk.dsort.core.Dsort.wait(
timeout: int = DEFAULT_DSORT_WAIT_TIMEOUT,
verbose: bool = True
) -> aistore.sdk.wait_result.WaitResult

Wait for a dSort job to finish

Parameters:

timeout
intDefaults to DEFAULT_DSORT_WAIT_TIMEOUT

The maximum time to wait for the job, in seconds. Default timeout is 5 minutes.

verbose
boolDefaults to True

Whether to log wait status to standard output

Returns: WaitResult

Outcome of the wait operation

Raises:

  • requests.RequestException: “There was an ambiguous exception that occurred while handling…”
  • requests.ConnectionError: Connection error
  • requests.ConnectionTimeout: Timed out connecting to AIStore
  • requests.ReadTimeout: Timed out waiting response from AIStore
  • errors.Timeout: Timeout while waiting for the job to finish