Skip to content
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

Support S3 paths in h2o.load_grid and h2o.loadGrid #16468

Open
hutch3232 opened this issue Jan 3, 2025 · 1 comment · May be fixed by #16478
Open

Support S3 paths in h2o.load_grid and h2o.loadGrid #16468

hutch3232 opened this issue Jan 3, 2025 · 1 comment · May be fixed by #16478
Labels

Comments

@hutch3232
Copy link

Is your feature request related to a problem? Please describe.
h2o's python package supports S3 paths in h2o.save_grid yet h2o.load_grid throws a "Not Implemented Error". The same is true for the corresponding R package functions. It seems like you should be able to save/load from the same paths like you can do for non-grid model objects.

Describe the solution you'd like
Implement S3 path support for h2o.load_grid and h2o.loadGrid.

Describe alternatives you've considered
Manually copy the grid files to a temporary file storage then apply h2o.load_grid.

@hutch3232
Copy link
Author

hutch3232 commented Jan 12, 2025

I don't know java, but looking around a bit, it seems possibly the solution is to implement the getParent method for S3 paths.

final Persist persist = H2O.getPM().getPersistForURI(gridUri);
final String gridDirectory = persist.getParent(gridUri.toString());

public String getParent(String path) {
throw new RuntimeException("Not implemented");
}

https://github.com/h2oai/h2o-3/blob/master/h2o-persist-s3/src/main/java/water/persist/PersistS3.java
does not contain an override.

S3 doesn't really have "directories" but I think it would work to just use "/" to strip off the end.

hutch3232 added a commit to hutch3232/h2o-3 that referenced this issue Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant