Closed Mobius1D closed 2 years ago
Hi,
~Currently It's a little hard to debug the pickle. Is the file shareable so that I can test it locally?~
Looks there are some behavior change, either in julia or the datastructure.jl, so the CI are actually failed.
@Mobius1D The error should be fix with the new release (0.2.3). However, since we haven't support numpy pickle, some of the file might not be fully loaded
I will try the fix.
Thanks a lot for your response.
@chengchingwen Hi,
The error still happens to persist.
MethodError: no method matching iterate(::Nothing)
Closest candidates are:
iterate(::Union{LinRange, StepRangeLen}) at range.jl:664
iterate(::Union{LinRange, StepRangeLen}, ::Int64) at range.jl:664
iterate(::T) where T<:Union{Base.KeySet{var"#s79", var"#s78"} where {var"#s79", var"#s78"<:Dict}, Base.ValueIterator{var"#s77"} where var"#s77"<:Dict} at dict.jl:693
...
Stacktrace:
[1] join(io::IOBuffer, strings::Nothing, delim::Char)
@ Base ./strings/io.jl:286
[2] sprint(::Function, ::Nothing, ::Vararg{Any, N} where N; context::Nothing, sizehint::Int64)
@ Base ./strings/io.jl:105
[3] sprint(::Function, ::Nothing, ::Vararg{Any, N} where N)
@ Base ./strings/io.jl:101
[4] join(strings::Nothing, delim::Char)
@ Base ./strings/io.jl:293
[5] execute!(p::Pickler{4}, #unused#::Val{Pickle.OpCodes.STACK_GLOBAL}, arg::Nothing)
@ Pickle ~/.julia/packages/Pickle/vqUU4/src/deserializer.jl:165
[6] run!(p::Pickler{4}, op::Pickle.OpCodes.OpCode, io::IOStream)
@ Pickle ~/.julia/packages/Pickle/vqUU4/src/deserializer.jl:24
[7] load(p::Pickler{4}, io::IOStream)
@ Pickle ~/.julia/packages/Pickle/vqUU4/src/deserializer.jl:14
[8] load(io::IOStream; proto::Int64)
@ Pickle ~/.julia/packages/Pickle/vqUU4/src/deserializer.jl:10
[9] load(io::IOStream)
@ Pickle ~/.julia/packages/Pickle/vqUU4/src/deserializer.jl:10
[10] top-level scope
@ In[30]:1
[11] eval
@ ./boot.jl:360 [inlined]
[12] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1094
And the version of Pickle is:
Status `~/.julia/environments/v1.6/Project.toml`
[fbb45041] Pickle v0.2.3
maze2d_umaze_dapg_1.zip This is the pickled file. It would be great if you could fix it because I am working on a project called ReinforcementLearningDatasets as a part of my open source promotion program and the project's success depends on this package.
Thanks in advance.
I pushed the new version (0.2.4) with a new function Pickle.npyload
. Since the file contain numpy array, it can not be loaded by regular Pickle.load
. Therefore I made a quick hack to make loading numpy array work. You should be able to call Pickle.npyload("../deep-ope-d4rl-maze2d_umaze_dapg_1/maze2d_umaze_dapg_1.pkl")
and get the desired output.
notice: Currently, I only fix the load part, which mean you still can't save julia object as numpy array. Also, I'll recommend manually check the loaded result since it a quick hack, and let me know if anything has the wrong result or even unloadable.
It works beautifully. Thanks so much for your time and efforts.
I am fine with the load part and am incredibly happy that it works.
Glad to hear that! If there aren't other problems, I'll close this issue.
Thanks to @chengchingwen 's help! ❤️
Hello everyone,
I am working on loading pickled RL models from deep_ope repository.
Which showed the following error.
I have tried loading the same file using Python.
Which returns the following:
I am not sure about the problem here. It would be great if I could get help regarding this.
Thanks in advance.