Comments (7)
Hi Mikhail,
right now we can serialize and deserialize models directly via H2O - look at https://github.com/h2oai/h2o-3/blob/master/h2o-core/src/main/java/water/api/ModelsHandler.java#L181-L208
The code export/import model to/from a given location. You can use similar code from Sparkling Water.
Later i will provide nicer Scala API.
Please, let me know if it works for you.
from sparkling-water.
Can you please provide scala code for this?
from sparkling-water.
At least Java code for import:
List<Key> importedKeys = new ObjectTreeBinarySerializer().load(FileUtils.getURI(mimport.dir));
Model model = (Model) importedKeys.get(0).get();
Java code for export
Model model = getFromDKV("model_id", mexport.model_id.key());
List<Key> keysToExport = new LinkedList<>();
keysToExport.add(model._key);
keysToExport.addAll(model.getPublishedKeys());
new ObjectTreeBinarySerializer().save(keysToExport, FileUtils.getURI(mexport.dir));
from sparkling-water.
Hi @mmalohlava,
I tried the Scala code here:
sparkling-water/core/src/main/scala/water/app/SparklingWaterApp.scala
Lines 138 to 151 in a0ed174
It seems both exportH2OModel and loadH2OModel work well! Thank you very much!
from sparkling-water.
Hi, as @Tian-Su said, the ModelSerializationSupport
trait contains methods exportH2OModel
and loadH2OModel
. These methods are preferred way how to export/load models.
If you need any more help, please feel free to reopen this issue or start new one.
Kuba
from sparkling-water.
Does ModelSerializationSupport
support hdfs?
from sparkling-water.
@BenRR yes
from sparkling-water.
Related Issues (20)
- QA/ Data loading in sparkling water HOT 7
- H2O_cluster_total_nodes always remains 1 on connecting with sparkling water external backend on k8 HOT 8
- Errors in deploying sparkling water in manual mode on kubernetes HOT 3
- QA/ H2O frame to delta lake HOT 1
- AWS Glue Jobs with: {"error":"TypeError: 'JavaPackage' object is not callable","errorType":"EXECUTION_FAILURE"} HOT 2
- H2OFrame repartitioning has no API in Python HOT 2
- How to export the AutoMl Models on real-time? HOT 4
- water.AutoBuffer$AutoBufferException: java.io.IOException: Error writing request body to server HOT 3
- Updating previously trained XGBoost HOT 2
- H2O node/pod becomes unhealthy HOT 8
- How resouces are shared in case of multiple request to external sparking water backend in k8?? HOT 3
- Deployment configuration error - request reached a non-leader H2O node HOT 6
- Sparkling water (Internal Backend mode) model training stuck at 100% with OOM Error HOT 5
- Ref count mismatch for vec ERROR while training GLM models HOT 23
- Latin/UTF-8 character encoding HOT 2
- Error when training XGBoost or conduct target encoding on data with high cardinality features on sparkling water HOT 13
- Errors for fitting sparkling water GLM HOT 12
- hello-world HOT 3
- water.exceptions.H2OIllegalArgumentException: Can only convert jobs producing a single Model or ModelContainer. HOT 15
- Failed to Create H20Context HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparkling-water.