Skip to content

Instantly share code, notes, and snippets.



Last active Jul 14, 2020
What would you like to do?
def get_run(proj_id):
get active and live runs for this model
s3_client = boto3.Session(profile_name=None).client('s3')
artifact_bucket = 'YOUR ARTIFACT BUCKET ON S3'
s3_object = s3_client.get_object(Bucket=artifact_bucket, Key='mlflow/'+proj_id+'/active_model_run')
active_run = s3_object['Body'].read().decode("utf-8")
s3_object = s3_client.get_object(Bucket=artifact_bucket, Key='mlflow/'+proj_id+'/live_model_run')
live_run = s3_object['Body'].read().decode("utf-8")
return active_run, live_run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment