我在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
答案 0 :(得分:0)
H2O JIRA包含引用您问题的问题PUBDEV-1566。
您可以尝试使用最新的H2O - 3.0.0.26,其中包含针对此问题的修复程序。你可以找到它here。