2015-07-02 40 views
0

我在R中使用h2o 3.0.0.22版本,我試圖保存我的模型。但我似乎無法弄清楚預期的格式。我嘗試了各種各樣的變化,但得到各種不同的例外。h2o.saveModel在Windows 8上拋出目錄異常

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機器上?

UPDATE: 此命令在這裏似乎創建一個文件夾&文件:

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/m[email protected]-1218026610891888320_on_TrainingData.hex_1_part0.temporary.sample.9.91%@1615017098181529186.bin 

回答

0

H2O JIRA包含問題PUBDEV-1566這是引用你的問題。

您可以嘗試使用最新的H2O - 3.0.0.26,其中包含修復問題。你可以找到它here

+1

謝謝。使用這個語法'h2o.saveModel(model,filename =「file:/// C:/ temp/model」)' – Sam7