tejank10 / AlphaGo.jl

AlphaGo Zero implementation using Flux.jl
https://fluxml.ai/experiments/go
Other
73 stars 14 forks source link

Training fails to save model #5

Open Keno opened 6 years ago

Keno commented 6 years ago
ERROR: SystemError: opening file ../models/agz_base.bson: No such file or directory
Stacktrace:
 [1] #systemerror#44 at ./error.jl:64 [inlined]
 [2] systemerror(::String, ::Bool) at ./error.jl:64
 [3] open(::String, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./iostream.jl:104
 [4] open(::String, ::String) at ./iostream.jl:132
 [5] open(::BSON.##16#17{Dict{Symbol,Flux.Chain}}, ::String, ::String) at ./iostream.jl:150
 [6] save_model(::AlphaGo.NeuralNet) at /home/keno/.julia/v0.6/AlphaGo/src/train.jl:21
 [7] #train#91(::Int64, ::Int64, ::Int64, ::Int64, ::Int64, ::Int64, ::Int64, ::Void, ::Int64, ::AlphaGo.#train, ::AlphaGo.GoEnv) at /home/keno/.julia/v0.6/AlphaGo/src/train.jl:87
 [8] (::AlphaGo.#kw##train)(::Array{Any,1}, ::AlphaGo.#train, ::AlphaGo.GoEnv) at ./<missing>:0

Two issues: 1) The model directory should probably be relative to the package directory rather than cwd 2) The directory should be created if it doesn't exist.