0

I have used H2O for about a year now to build and score models but have never used MOJO to do this. This is something I am currently wanting to do and I came across the function h2o.mojo_predict_df to score out my models which will drastically increase runtime as well as allowing me to update my h2o without the worry of my models not scoring in a later version of h2o.

So I have downloaded my .zip from MOJO and corresponding .jar file, let's say they sit in the folder

C:\Folder\Test\Model.zip

C:\Folder\Test\h2o-genmodel.jar

Now am I trying to run it through, lets say my R data frame is called Data then I am using:

h2o.mojo_predict_df(frame = Data, 
                    mojo_zip_path = "C:/Folder/Test/Model.zip",
                    genmodel_jar_path = "C:/Folder/Test/h2o-genmodel.jar")

However, this produces the error:

Error in safeSystem(cmd_str): SYSTEM COMMAND FAILED (exit status 127).

I am not quite sure what this is. My experience is java is limited. I tried on a different machine and got a completely different error:

"Error: Could not create a Java Virtual Machine". Error: A fatal exception has occurred. The program will exit. Unrecognised option : - 1. Error in safeSystem(cmd_str) : SYSTEM COMMAND FAILED (exit status 1).

I'm not sure why they got different errors. The code ran was exactly the same.

Any help would be appreciated!

nathan
  • 11
  • 1
  • 5
  • can you post the version of h2o-3 and java you are using? Thanks! – Lauren Oct 29 '18 at 19:07
  • Hi Lauren, I followed this up off the site and it was a bug, there is a jira ticket for this issue now https://0xdata.atlassian.net/browse/PUBDEV-6026 cheers – nathan Oct 31 '18 at 10:47
  • awesome thanks for looking into it. I will repost your comment as a solution so it is easier for others to find. – Lauren Oct 31 '18 at 17:28

1 Answers1

0

As nathan mentioned in the comments the error is due to a bug in Stacked Ensemble Mojo which can be tracked here: 0xdata.atlassian.net/browse/PUBDEV-6026

Lauren
  • 5,640
  • 1
  • 13
  • 19
  • I just got bit by this same problem. Was a solution ever established? – Dean Oct 09 '20 at 13:48
  • it should be, if you click on the link you can see that the ticket is resolved in version 3.24.0.1. what version of h2o are you using, if you are using an older version can you upgrade. If you are still seeing an issue, please post directly on the jira ticket. Thanks! – Lauren Oct 09 '20 at 21:52
  • Thanks for confirming. I was getting the same error and assumed I was having the same problem. After a bit of testing on both my personal and work computers (same exact code, data, seed values, operating system, package versions, etc.), I’m not having any problems on my personal computer. Long story short after more testing, I suspect my problem is attributable to IT security constraints on my work computer. Sorry for the hassle! – Dean Oct 10 '20 at 11:41