Jobs API
Listing jobs
The List Jobs
API returns your currently initiated jobs. By default, only active jobs, which means the jobs that are currently executing, are returned.
- Python
You can provide an additional argument active=False
to return all
jobs. You can also retrieve a specific type of job by specifying the
job_type
parameter.
from featurestore.core.job_types import INGEST, RETRIEVE, EXTRACT_SCHEMA, REVERT_INGEST, MATERIALIZATION_ONLINE
client.jobs.list()
client.jobs.list(active=False, job_type=INGEST)
The active
parameter indicates that the job is currently executing.
Getting a job
- Python
job = client.jobs.get("job_id")
Cancelling a job
To request cancel without waiting for cancellation to complete you need to call
- Python
job.cancel()
To request cancel and wait for cancellation to complete you need to call
- Python
job.cancel(wait_for_completion=True)
Checking job status
- Python
job.is_done()
Checking if job is cancelled
- Python
job.is_cancelled()
Getting job results
- Python
job.get_result()
Checking job metrics
- Python
job.get_metrics()
How to download using RetrieveJob
- Python
Unlike other job types, RetrieveJob
also has a download
method which
gives you the option to download retrieved data created by the backend
job.
You can also make use of the download_async
method that downloads the
files asynchronously. More information about asynchronous methods is at
Asynchronous methods.
retrieve_job = client.jobs.get("job_id")
data_path = retrieve_job.download()
Job metadata
Field Name | User Modifiable | Values |
---|---|---|
id | No | - |
jobType | No | Ingest, Retrieve, ExtractSchema, Revert, MaterializationOnline, ComputeStatistics, ComputeRecommendationClassifiers, CreateMLDataset, Backfill |
done | No | true, false |
cancelled | No | true, false |
childJobIds | No | Child job ids |
The done
parameter indicates that the job has completed its execution and the results are available.
- Submit and view feedback for this page
- Send feedback about H2O Feature Store to cloud-feedback@h2o.ai