-
Notifications
You must be signed in to change notification settings - Fork 17
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
simulate
has type instability with POMDPs 0.7.3
when testing with Julia 1.0
#12
Comments
Notice: this is only an issue with |
simulate
has type instability with POMDPs 0.7.3
simulate
has type instability with POMDPs 0.7.3
when testing with Julia 1.0
Yeah... I think just do [compat]
julia = "^1.1" or do |
I don't see why this is happening since |
It seems to be mainly that in using Random
using POMDPs
using POMCPOW
using POMDPModels
pomdp = BabyPOMDP()
s = first(states(pomdp))
a = first(actions(pomdp))
solver = POMCPOWSolver()
rng = MersenneTwister(1)
function f(pomdp, s, a, rng)
if rand() > 0.5
sp, o, r = gen(DDNOut(:sp, :o, :r), pomdp, s, a, rng)
else
sp, r = gen(DDNOut(:sp, :r), pomdp, s, a, rng)
end
return r
end
f(pomdp, s, a, rng)
@code_warntype f(pomdp, s, a, rng) Julia 1.0.5:
Julia 1.2
|
Could this be fixed with a type annotation for r?
(sent from phone)
…On Wed, Sep 18, 2019, 17:10 Lasse Peters ***@***.***> wrote:
Closed #12 <#12>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#12?email_source=notifications&email_token=ABALI23PNEED2FYBODCMFPTQKK7O7A5CNFSM4IYBSQXKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTWV24CY#event-2645274123>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABALI266QZLWQNIHXVBI7JTQKK7O7ANCNFSM4IYBSQXA>
.
|
I thought about it but do we have a concrete type to annotate here? I can imagine that people sometimes use something else then Float64. Or is there a way to do generic annotations, like `a::T, b::T where T` to just say that they are of the same type, but allow for arbitrary `T`.
|
With a type annotation, of |
yes, this seems like the right thing to do - it's fine to make them use version >= 1.1 |
* V0.8 compat * Remove support for Julia 1.0 - fixes #12 * Deprecate current_obs and implement currentobs and history on POWTreeObsNode * Never hand POWTreeObsNode to actions(m,b) * Bump version
The test's fail when used with
POMDPs 0.7.3
becausesimulate
is type unstable and therefore the@inferred
test fails.The text was updated successfully, but these errors were encountered: