cancel
Showing results for 
Search instead for 
Did you mean: 

Sharing Deployment with Job Definitions

Sharing Deployment with Job Definitions

Hello! 

 

How can one share a deployment together with job definitions?

 

As far as I understand, there is no functionality to share a job definition exactly as defined by a user because it may contain connection credentials.

 

However, I wonder if there is a way to share (or automatically copy) the job definition without credentials.

 

The goal here is to avoid typos and other mistakes if we manually re-create job definitions for multiple user who share the deployment. An ideal scenario would be an ability to share job definitions without credentials so that the only thing a user has to do for each job definition is to enter credentials without touching anything else (e.g. input SQL queries or prediction destination tables).

 

Any thoughts are much appreciated.

 

@amrita_hotwani 

Labels (1)
9 Replies
dalilaB
DataRobot Alumni

Are you comfortable with code?  

There are currently code-based approaches to sharing job definitions between users.

Sounds good! Could you please point to any examples? (or maybe just a relevant section in the documentation)

Let's start with the Python documentation, and if that's not quite enough, I can cook up some examples and share those with you.

Here's a link to our batch job definition script in Pythonhttps://datarobot-public-api-client.readthedocs-hosted.com/en/v2.28.0/reference/predictions/batch_pr...

And here's a link to how to create a credential_id (also in Python), which would be the one part left blank in that script when shared among team mates: https://datarobot-public-api-client.readthedocs-hosted.com/en/v2.28.0/reference/admin/credentials.ht...

...

0 Kudos

Update! Your success team is going to follow up with some additional information that may streamline this process for you, so you may want to hold off on setting up a code-based approach until you hear from them. 

Thank you for taking the time to look into that!

Hi Cynthia, I think I need some extra help. I see how one can create a definition using create()  method and supplying a dictionary (or .json) with the parameters. What about extracting that dictionary from an existing definition. Basically, I need to see the definition's specs.

0 Kudos

Try this in the Python API, substituting your own job definition id:

job_def = dr.BatchPredictionJobDefinition.get("629bc497fdfbf5cddd3b1da9")
job_def.batch_prediction_job

That returned:

{'num_concurrent': __,
 'threshold_high':__,
 'threshold_low':__,
 'deployment_id': '__',
 'passthrough_columns_set': '__',
 'max_explanations':__,
 'prediction_warning_enabled':__,
 'intake_settings': {'__': '__',
  '__': '__'},
 'output_settings': {'__': '__',
  '__': '__',
  '__': '__',
  '__': '__'},
 'chunk_size': '__',
 'csv_settings': {'__': '__', '__': '__', '__': '__'},
 'abort_on_error':__,
 'skip_drift_tracking':__,
 'include_probabilities':__,
 'include_prediction_status':__,
 'include_probabilities_classes': [__],
 'disable_row_level_error_handling':__,
 'redacted_fields': [__]}