-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default for :info
?
#27
Comments
oh, hmm... I didn't think about this. I don't think it's a good idea to provide an implementation for if :info in nodenames(DDNStructure(m))
sp, r, i = gen(DDNOut(:sp, :r, :info), m, s, a, rng)
else
sp, r = gen(DDNOut(:sp, :r), m, s, a, rng)
i = nothing
end I think the compiler should be able to remove the dead branch. This is a little ugly, so maybe we should make something nicer eventually, like a |
That is what I was looking for thanks. I don't think the compiler is able to do that since now it is breaking the type stability tests. I will try to find a better way. |
I found a way to keep the type stability but it seems a bit hacky. |
Maybe in POMDPModelTools there should be a wrapper that adds a node if it doesn't exist, i.e. wrapper = assure_hasnodes(pomdp, (:info=>nothing, :c=>0.0)) If |
When testing RLInterface on
POMDPs#version-0.8
I am getting the following error:KeyError: key :info not found
which results from a call to:
I realized there is no default for :info anymore: https://github.com/JuliaPOMDP/POMDPModelTools.jl/blob/master/src/info.jl#L84
nothing
?e.g.
POMDPs.gen(out::DDNOut{(:sp,:o,:r,:info)}, m, s, a, rng) = (gen(out, m, s, a, rng)..., nothing)
, but with a smarter way to handle all the combination forout
:info
is available?The text was updated successfully, but these errors were encountered: