Last active
July 11, 2017 16:52
-
-
Save francoismarceau29/ba76da240455eebe6b0b1b1039caa407 to your computer and use it in GitHub Desktop.
Loading Scikit model from S3 using Boto3
This file contains hidden or 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 load_model(): | |
conn = S3Connection() | |
bucket = conn.create_bucket(BUCKET_NAME) | |
key_obj = Key(bucket) | |
key_obj.key = MODEL_FILE_NAME | |
contents = key_obj.get_contents_to_filename(MODEL_LOCAL_PATH) | |
return joblib.load(MODEL_LOCAL_PATH) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment