Skip to content

Managing Jobs#

Submit a job#

my_project = c.get_project(id="project_123")

dataview_1 = my_project.get_dataview(uri="s3://my-data.csv")
dataview_2 = my_project.get_dataview(uri="s3://my-data-2.csv")

vlr = VerticallyPartitionedLinearRegression(

Default response:

Job(id=abc_123, job_type=LINEAR_REGRESSION, status=Created)

Setting the Storage Location as a Model Owner in Cape#

The results of the trained model will be saved to an S3 bucket location that you notify Cape about. This can be done in two ways:

Get a Job's Status#

lr_job = my_project.get_job(id="abc_123")


Default response:


Get a Job's Results#

lr_job = my_project.get_job(id="abc_123")

weights, metrics = lr_job.get_results()

Default response:

(array([12.14955139,  1.96560669]),
{'r_squared_result': [0.8804865768463074], 'mse_result': [37.94773864746094]})

Accessing Weights as a Model Owner in Cape#

pycape uses boto to access the model weights in your S3 bucket. You'll need to inform pycape about your IAM authentication credentials. Cape expects values for the following AWS configuration keys: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION.

You can set these keys as environment variables in the interpreter running pycape:

export AWS_ACCESS_KEY_ID=<Access-Key>
export AWS_SECRET_ACCESS_KEY=<Secret-Key>
export AWS_REGION=<Region>

Alternatively you can simply add these keys to your AWS Configuration file.