You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
Should be able to save a model.
Observed behavior:
10-27 10:10:59.142 10.9.93.208:54321 51379 FJ-1-5 INFO water.default: Completing model GBM_model_1698426647655_1
10-27 10:10:59.142 10.9.93.208:54321 51379 main WARN water.default: Model Builder for algo = GBM is not registered. Unable to determine if Model has a MOJO. Please override method haveMojo().
gbmModel status of haveMojo() is false
Exception in thread "main" water.exceptions.H2ONotFoundArgumentException: Failed to find schema for version: 3 and type: GBMModel
at water.api.SchemaServer.schema(SchemaServer.java:285)
at water.api.SchemaServer.schema(SchemaServer.java:251)
at hex.ModelMojoWriter.writeModelDetails(ModelMojoWriter.java:97)
at hex.ModelMojoWriter.writeExtraInfo(ModelMojoWriter.java:89)
at hex.genmodel.AbstractMojoWriter.writeTo(AbstractMojoWriter.java:169)
at hex.genmodel.AbstractMojoWriter.writeTo(AbstractMojoWriter.java:160)
at hex.ModelMojoWriter.writeTo(ModelMojoWriter.java:77)
at org.example.TrainAModel.saveMOJOModel(TrainAModel.java:414)
at org.example.TrainAModel.main(TrainAModel.java:396)
If I see additional questions- activity, I am willing to answer on code or what arguments/params I use for creating the GBM model etc.,
Also, is there a way to call predict on a gbmModel from Java, instead of using a EZPredictorWrapper ?
Programming language used
Scala
Programming language version
Java 8
What environment are you running Sparkling Water on?
Other (described above)
Environment version info
Local test cluster
Brief cluster specification
1 Node
Relevant log output
10-27 10:10:59.142 10.9.93.208:54321 51379 FJ-1-5 INFO water.default: Completing model GBM_model_1698426647655_1
10-27 10:10:59.142 10.9.93.208:54321 51379 main WARN water.default: Model Builder for algo = GBM is not registered. Unable to determine if Model has a MOJO. Please override method haveMojo().
gbmModel status of haveMojo() is false
Exception in thread "main" water.exceptions.H2ONotFoundArgumentException: Failed to find schema for version: 3 and type: GBMModel
at water.api.SchemaServer.schema(SchemaServer.java:285)
at water.api.SchemaServer.schema(SchemaServer.java:251)
at hex.ModelMojoWriter.writeModelDetails(ModelMojoWriter.java:97)
at hex.ModelMojoWriter.writeExtraInfo(ModelMojoWriter.java:89)
at hex.genmodel.AbstractMojoWriter.writeTo(AbstractMojoWriter.java:169)
at hex.genmodel.AbstractMojoWriter.writeTo(AbstractMojoWriter.java:160)
at hex.ModelMojoWriter.writeTo(ModelMojoWriter.java:77)
at org.example.TrainAModel.saveMOJOModel(TrainAModel.java:414)
at org.example.TrainAModel.main(TrainAModel.java:396)
Code to reproduce the issue
privatevoidbuildModel(){
try {
System.out.println("In the try block..");
//Splitintotrain, testandholdoutsetsKey[] keys=newKey[]{Key.make("train.hex"),Key.make("test.hex"),Key.make("hold.hex")};
double[] ratios=newdouble[]{0.7,0.15,0.15};
Frame[] frs=ShuffleSplitFrame.shuffleSplitFrame(data,keys,ratios,1234567689L);
Frametrain=frs[0];
Frametest=frs[1];
//Framehold=frs[2];
data.remove();
System.out.println(train);
System.out.println(test );
//CreateaGBMmodelGBMParametersparams=newGBMParameters();
params._train=train._key;
params._valid=test._key;
params._score_each_iteration=false;
params._response_column="YVAL";
params._ntrees=500;
params._max_depth=10;
params._min_rows=10;
params._nbins=20;
params._learn_rate=0.1f; //sameasdefault//Gaussiandemandstheresponsetobeanumber--wehaveaYorN-sowontwork.
//params._distribution=DistributionFamily.gaussian; //sameasdefaultJob<GBMModel>job=newGBM(params).trainModel();
this.gbmModel=job.get();
System.out.println("gbmModel status of haveMojo() is "+this.gbmModel.haveMojo());
Stringfilename=JCodeGen.toJavaId(gbmModel._key.toString()) +".java";
StreamingSchemass=newStreamingSchema(gbmModel.newJavaModelStreamWriter(false), filename);
StreamWritersw=ss.getStreamWriter();
OutputStreamos=newFileOutputStream(OUT_SRC_DIR+filename);
sw.writeTo(os);
} catch(Exceptionexcp) {
System.out.println("Catching exception.."+excp.toString());
excp.printStackTrace();
} finally {
if (data!=null) {
data.remove();
}
}
}
TheactualsaveofthemodeltoMOJOformatisdoneusingprivatevoidsaveMOJOModel(){
try {
this.mojoModelPath=OUT_MODEL_DIR+modelFileName;
FileOutputStreammojoModelOutStream=newFileOutputStream(this.mojoModelPath);
gbmModel.getMojo().writeTo(mojoModelOutStream);
//gbmModel.exportMojo(this.mojoModelPath, true);
mojoModelOutStream.close();
System.out.println("Model written out as a MOJO to file "+mojoModelPath);
} catch (IOExceptionioe){
System.out.println("Exception during write Model: - Mode written out as a MOJO to file ");
ioe.printStackTrace();
}
}
The text was updated successfully, but these errors were encountered:
We currently do not support Java in Sparkling Water, and H2O-3 doesn't expose the Java API to the outside world.
Is it possible for you to use a different tech stack to achieve what you're trying to do?
Sparkling Water Version
3.42
Issue description
Expected behavior:
Should be able to save a model.
Observed behavior:
10-27 10:10:59.142 10.9.93.208:54321 51379 FJ-1-5 INFO water.default: Completing model GBM_model_1698426647655_1
10-27 10:10:59.142 10.9.93.208:54321 51379 main WARN water.default: Model Builder for algo = GBM is not registered. Unable to determine if Model has a MOJO. Please override method haveMojo().
gbmModel status of haveMojo() is false
Exception in thread "main" water.exceptions.H2ONotFoundArgumentException: Failed to find schema for version: 3 and type: GBMModel
at water.api.SchemaServer.schema(SchemaServer.java:285)
at water.api.SchemaServer.schema(SchemaServer.java:251)
at hex.ModelMojoWriter.writeModelDetails(ModelMojoWriter.java:97)
at hex.ModelMojoWriter.writeExtraInfo(ModelMojoWriter.java:89)
at hex.genmodel.AbstractMojoWriter.writeTo(AbstractMojoWriter.java:169)
at hex.genmodel.AbstractMojoWriter.writeTo(AbstractMojoWriter.java:160)
at hex.ModelMojoWriter.writeTo(ModelMojoWriter.java:77)
at org.example.TrainAModel.saveMOJOModel(TrainAModel.java:414)
at org.example.TrainAModel.main(TrainAModel.java:396)
If I see additional questions- activity, I am willing to answer on code or what arguments/params I use for creating the GBM model etc.,
Also, is there a way to call predict on a gbmModel from Java, instead of using a EZPredictorWrapper ?
Programming language used
Scala
Programming language version
Java 8
What environment are you running Sparkling Water on?
Other (described above)
Environment version info
Local test cluster
Brief cluster specification
1 Node
Relevant log output
Code to reproduce the issue
The text was updated successfully, but these errors were encountered: