Helpers

gretel_client.helpers.poll(job: gretel_client.projects.jobs.Job, wait: int = - 1)

Polls a Model or RecordHandler.

Parameters
  • job – The job to poll

  • wait – The time to wait for the job to complete.

gretel_client.helpers.submit_docker_local(job: gretel_client.projects.jobs.Job, *, output_dir: Union[str, pathlib.Path] = None, in_data: Union[str, pathlib.Path, None] = None, model_path: Union[str, pathlib.Path, None] = None)gretel_client.projects.docker.ContainerRun

Run a Job from a local docker container.

While the Job is running, the submit_docker_local function will block and periodically send back status updates as the Job progresses.

Note: Please ensure the Job has not already been submitted. If the Job has already been submitted, the run will fail.

Parameters
  • job – The job to run. May be either a Model or RecordHandler.

  • output_dir – A directory path to write the output to. If the directory does not exist, the path will be created for you. If no path is specified, the current working directory is used.

  • in_data – Input data path.

  • model_path – If you are running a RecordHandler, this is the path to the model that is being ran.

Returns

A ContainerRun that can be used to manage the lifecycle of the associated local docker container.