h2o.saveModel Windows 8 上的目录抛出异常

h2o.saveModel throwing exception with directory on Windows 8

我在 R 中使用 h2o 版本 3.0.0.22,我正在尝试保存我的模型。但我似乎无法弄清楚预期的格式。我尝试了各种变体,但得到了各种不同的异常。

h2o.saveModel(model, dir="c:/temp", name= "my.model")

ERROR: Unexpected HTTP Status code: 400 Bad Request (url = http://127.0.0.1:54321/3/Models.bin/DeepLearningModel__8412f3abf1699b5593a55c6861c8468d?dir=c%3A%2Ftemp%2Fmy.model&force=0)

java.lang.IllegalArgumentException
 [1] "water.persist.PersistManager.getPersistForURI(PersistManager.java:407)"          
 [2] "water.serial.ObjectTreeBinarySerializer.save(ObjectTreeBinarySerializer.java:57)"
 [3] "water.api.ModelsHandler.exportModel(ModelsHandler.java:206)"                     
 [4] "sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)"                     
 [5] "sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)"                 
 [6] "java.lang.reflect.Method.invoke(Unknown Source)"                                 
 [7] "water.api.Handler.handle(Handler.java:56)"                                       
 [8] "water.api.RequestServer.handle(RequestServer.java:677)"                          
 [9] "water.api.RequestServer.serve(RequestServer.java:614)"                           
[10] "water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:438)"                             
[11] "java.lang.Thread.run(Unknown Source)"                                            

Error in .h2o.doSafeREST(conn = conn, h2oRestApiVersion = h2oRestApiVersion,  : 
  Cannot find persist manager for scheme c

如何在我的 Windows 8 机器上保存我的模型?

更新: 这里的这个命令似乎创建了一个文件夹和文件:

h2o.saveModel(model, filename="file:///C:/temp/model")

这创建了一个文件:C:/temp/DeepLearningModel__8412f3ab21699b5593aa5c6861c8468d.bin 但随后抛出一个不同的错误:

ERROR: Unexpected HTTP Status code: 400 Bad Request (url = http://127.0.0.1:54321/3/Models.bin/DeepLearningModel__8412f3abf1699b5593a55c6861c8468d?dir=file%3A%2F%2F%2FC%3A%2Ftemp%2Fmodel&force=0)

java.lang.IllegalArgumentException
 [1] "java.net.URI.create(Unknown Source)"                                             
 [2] "water.serial.ObjectTreeBinarySerializer.save(ObjectTreeBinarySerializer.java:70)"
 [3] "water.api.ModelsHandler.exportModel(ModelsHandler.java:206)"                     
 [4] "sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)"                     
 [5] "sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)"                 
 [6] "java.lang.reflect.Method.invoke(Unknown Source)"                                 
 [7] "water.api.Handler.handle(Handler.java:56)"                                       
 [8] "water.api.RequestServer.handle(RequestServer.java:677)"                          
 [9] "water.api.RequestServer.serve(RequestServer.java:614)"                           
[10] "water.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:438)"                             
[11] "java.lang.Thread.run(Unknown Source)"                                            

Error in .h2o.doSafeREST(conn = conn, h2oRestApiVersion = h2oRestApiVersion,  : 
  Malformed escape pair at index 165: file:///C:/temp/model/modelmetrics_DeepLearningModel__8412f3abf1699b5593a55c6861c8468d@-1218026610891888320_on_TrainingData.hex_1_part0.temporary.sample.9.91%@1615017098181529186.bin

H2O JIRA 包含引用您的问题的问题 PUBDEV-1566

您可以尝试使用最新的 H2O - 3.0.0.26 修复了这个问题。你可以找到它 here.