Last active
July 14, 2020 19:56
-
-
Save awaiskaleem/f71bf5e0640a2e6f3c23cd52a4547fd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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