cancel
Showing results for 
Search instead for 
Did you mean: 

Automate downloading scoring jar file from a DR deployment?

j760824@8451.com
Blue LED

Automate downloading scoring jar file from a DR deployment?

 

 

 

def get_scoring_jar_file(client, deployment_id=None, path_to_save=None):
    """description: method to retrieve jar file
    
        inputs:
            client (dr.Client)     :  a connected datarobot client 
            deployment_id (str)    : id of deployment to retrieve jar file
            path_to_save (str)     : path to save the jar file

        returns:
            None : writes file to
                path_to_save/scoringcode_{modelpkg_id}_{deployment_id}.jar
    
    """
    jarfile = client.get(
        'deployments/{0}/scoringCode'.format(deployment_id)
    )

    with open(os.path.join(path_to_save, 'scoringcode_{0}.jar'.format(deployment_id)), 'wb') as file:
        file.write(jarfile.content)

 

 

see 

 

 

Labels (2)
0 Kudos
1 Reply
j760824@8451.com
Blue LED

recommend pairing this method with Push Jar to Snowflake 

0 Kudos