et_engine.batches¶
Classes
|
An Interface & Client for interacting with an ET Engine Batch. |
|
Client for interacting with ET Engine Batches. |
|
Decorate an iterable object, returning an iterator which acts exactly like the original iterable, but prints a dynamically updating progressbar every time a value is requested. |
- class Batch(base_url: str, *args, **kwargs)¶
Bases:
Batch
An Interface & Client for interacting with an ET Engine Batch.
- delete() None ¶
Delete this batch. * NOTE: This will not cancel any jobs, which will still run and incur costs once deleted.
- static from_json(base_url: str, batch_json: dict) Self ¶
Convert a JSON object to an interactive Batch.
- Parameters:
base_url (str) – Base endpoint for requests.
batch_json (dict) – JSON description of the Batch.
- Returns:
A Batch object.
- Return type:
Self
- status(max_retries: int = 5) BatchStatus ¶
Fetches a summary of the status of all jobs in the Batch.
- Parameters:
max_retries (int, optional) – Number of requests to try before raising an exception. Defaults to 5.
- Raises:
Exception – Max retries exceeded.
- Returns:
An et_engine_core.BatchStatus object summarizing the status of all jobs in the Batch.
- Return type:
etc.BatchStatus
- wait(interval: int = 15, thresh: int = None) None ¶
Wait for the Batch to finish processing.
- Parameters:
interval (int, optional) – Number of seconds between status refreshes, in seconds. Defaults to 15.
thresh (int, optional) – Threshold number of jobs to finish waiting, if None then it waits until all jobs finish. Defaults to None.
- class BatchesClient(base_url: str = 'https://api.exploretech.ai/v1')¶
Bases:
APIClient
Client for interacting with ET Engine Batches.
- clear_batches() None ¶
Deletes all batches.