POJO compilation fails (Algo: GBM, H2o-Version 3.8.1.3, Javac: 1.8.0_45, Mac OSX 10.11.3 / Fedora 23) -


i try locally compile pojo of gbm prediction model generated h2o 3.8.1.3; follow instructions in pojo class:

  • create folder
  • download h2o-genmodel.jar folder with:

    curl http://myh2oinstancesurl:myh2oinstancesport/3/h2o-genmodel.jar > h2o-genmodel.jar 
  • download trained gbm model named 154 folder with:

    curl http://myh2oinstancesurl:myh2oinstancesport/3/models/154/java > 154.java 
  • compile sources in folder javac 1.8.0_45 under max osx 10.11.3 or fedora 23:

     javac -cp h2o-genmodel.jar 154.java 
  • result bunch of compilation errors:

    154.java:24: error: <identifier> expected public class 154 extends genmodel {         ^ 154.java:24: error: illegal start of type public class 154 extends genmodel {              ^ 154.java:24: error: ';' expected public class 154 extends genmodel {                              ^ 154.java:25: error: illegal start of expression   public hex.modelcategory getmodelcategory() { return hex.modelcategory.binomial; }   ^ 154.java:25: error: ';' expected    public hex.modelcategory getmodelcategory() { return hex.modelcategory.binomial; }                                        ^ 154.java:27: error: illegal start of expression    public boolean issupervised() { return true; }   ^ 154.java:27: error: ';' expected   public boolean issupervised() { return true; }                          ^ 154.java:28: error: illegal start of expression   public int nfeatures() { return 14; }   ^ 154.java:28: error: ';' expected   public int nfeatures() { return 14; }                   ^ 154.java:29: error: illegal start of expression   public int nclasses() { return 2; }   ^ 

    ...

    100 errors 

    is there issue procedure? or bug setup? there can compile gbm pojos? responses!

solved: problem pojo class name has valid java class name; purely numeric name not allowed. changing model name resolves issue.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -