-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save a h2o.ai model to S3 bucket in python #9260
Comments
Lauren DiPerna commented: issue is posted on StackOverFlow [here |https://stackoverflow.com/questions/55182284/save-a-h2o-ai-model-to-s3-bucket-in-python] |
Pavel Pscheidl commented: Currently, this is not supported. PersistS3 Class, line 263. {code:java} |
Pavel Pscheidl commented: S3A supports it. PersistHDFS class:
} |
Michal Kurka commented: reclassified to an improvement, minor priority - preferred way is to use S3A/S3N (on EMR) |
Prabhu Subramanian commented: Hi All, Is this also applicable for the below export? {code:python}h2o.export_file(data_frame ,path='s3a://…..'){code} |
Michal Kurka commented: [~accountid:5b9be0a796cb052b5f65d3a5] yes, the same applies to all export functions - you need to use “s3a” for your exports |
Prabhu Subramanian commented: Hi Michal, I know this might not be related to this ticket, but I needed some help in understanding the error I am trying to look into, which is related to this ticket. I would really appreciate it if you can help me with the error below which is in a way related to the ticket. {code:python}h2o.export_file(data_frame ,path='s3a://bucket_name/path/dataset.csv'){code} Error below: {code:python}H2OServerError: HTTP 500 Server Error: |
Michal Kurka commented: this looks like you provided invalid AWS access key id, can you make sure it is correct? |
Prabhu Subramanian commented: Hi Michal, Credentials provided through the XML file actually works for {{h2o.import_file('s3://…')}} But not for the export statements, even with the {{s3a}} or {{s3n}}. I tried all the possibilities, but no success with the correct credentials provided. I am sure the credentials are right, because of the import statements working well, but not the export statements. |
Kunal Mishra commented: I’ll throw a +1 in for implementing saving to S3 natively! As it is, I’ll probably save locally and use the R package {{aws.s3}} to work around the limitation, for anyone else looking for alternative solutions. |
Michal Kurka commented: [~accountid:5cc0b0886fbf5a10040d2945] thanks for the input, I think it would be a great change to add |
Kunal Mishra commented: Yup. Leaving an implementation here for anybody who comes through looking for the same thing! {code:r}save_h2o_model_to_s3 <- function(h2o_model, s3_path, save_type = 'model', local_save_dir = tempdir(), keep_local = FALSE, show_progress = TRUE, force = TRUE) {
}{code} |
Prabhu Subramanian commented: Should we expect this fix in the upcoming version? |
Michal Kurka commented: [~accountid:5b9be0a796cb052b5f65d3a5] resolved as “fixed”, meaning the code change was implemented and the target release will have this feature working Fix version was set to 3.34.0.1 which is H2O’s next major release you can expect in 1-2 months. |
Michal Kurka commented: [~accountid:5b9be0a796cb052b5f65d3a5] you are welcome to try this feature in our nightly builds [http://h2o-release.s3.amazonaws.com/h2o/master/latest.html|http://h2o-release.s3.amazonaws.com/h2o/master/latest.html] Please keep in mind I just resolved the ticket today and the current nightly will not have it yet. It should appear there after a day or 2. |
Prabhu Subramanian commented: Thank you very much, Michal! Looking forward to it. Appreciate your updates. |
JIRA Issue Migration Info Jira Issue: PUBDEV-6364 Linked PRs from JIRA |
I have been using the command below to save my h2O model into a s3 bucket in python3 (I am using amazon EMR):
h2o.save_model(model=best_gbm1,path='s3://bucketname/folder1/folder2', force=False)
but I do get the following error:
H2OServerError: HTTP 500 Server Error: Server error java.lang.RuntimeException: Error: Not implemented Request: None
is it possible to save a H2O model directly to a S3 bucket
The text was updated successfully, but these errors were encountered: