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)
- Sparkling Water not properly configuring RAM on Databricks HOT 1
- R docker build failing again
- h2o-pysparkling-3.x does not support pep517 builds HOT 4
- Install proper setuptools
- Scala 2.13 support - part 1 - investigation
- Scala 2.13 support - part 2 - implementation
- Use newer Ubuntu in test docker image
- Upgrade H2O to 3.44.0.3
- Can't install pysparkling after updating setuptools >= 69.0.0 HOT 2
- Quiet and Embedded arguments are not working in the last version 3.44.0.3 HOT 1
- libxgboost.so getting filled in /tmp HOT 8
- Error - Spark parameters on H2O Sparkling water SIG
- describe an h2oframe HOT 2
- describe an h2oframe
- RestApiCommunicationException: H2O node http://10.159.20.11:54321 responded with HOT 1
- Upgrade H2O to 3.46.0.1
- docs: out of date Spark version listings HOT 1
- AIC/Loglikelihood metrics generation problems
- when will sparkling-water 3.46.0.1 be released? HOT 1
- expose uuid for dai mojo
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.