Job#

class job.Job[source]#

Class that allows you to interact with SpaceSense Job backend.

Parameters
  • name (str, optional) – User defined name for this specific job run.

    Default: None

  • workflow_id (str, optional) – ID corresponding to a specified workflow constructed on the SpaceSense backend.

    Default: None

  • experiment_id (str) – ID describing the experiment and workspace. This ID corresponds to the cloud workspace where any downloaded data is stored from previous runs. To reduce your download costs and usage, if running an experiment multiple times, please keep this ID identical between runs.

  • id (str, optional) – Automatically generated unique ID of your instance.

refresh()[source]#

Refresh the status of the current job and all the issued tasks

execution_report()[source]#

A simple report, in the form of a dataframe, detailing the current steps and status of the job tasks

download_result(output_dir=None)[source]#

Download the completed results of the job task

retry()[source]#

Retries the execution of the job ONLY for the individual tasks that failed in error

cancel()[source]#

Cancel this job

Example#

>>> client = Client(id="job_experiment")
>>> with open("my_input_file_100.geojson") as f:
>>>     geojson = json.load(f)
>>> newjob = client.run_job(name="My_100_AOIs", workflow="fuse_closest_s1_s2", input=geojson)
>>> newjob.id
>>> newjob.status
>>> newjob.refresh()
>>> newjob.execution_report()
>>> newjob.retry()
>>> job = client.get_job(id="example_id_normally_autogenerated")
>>> job.download_result()