Created
October 6, 2015 18:00
-
-
Save mmalohlava/d3744cfe0d486ad44c85 to your computer and use it in GitHub Desktop.
Load model into DKV
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
| public ModelsV3 importModel(int version, ModelImportV3 mimport) { | |
| ModelsV3 s = (ModelsV3) Schema.newInstance(ModelsV3.class); | |
| try { | |
| List<Key> importedKeys = new ObjectTreeBinarySerializer().load(FileUtils.getURI(mimport.dir)); | |
| Model model = (Model) importedKeys.get(0).get(); | |
| s.models = new ModelSchema[1]; | |
| s.models[0] = (ModelSchema) Schema.schema(version, model).fillFromImpl(model); | |
| } catch (IOException e) { | |
| throw new H2OIllegalArgumentException("dir", "importModel", e); | |
| } | |
| return s; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment