Comments (1)
Seems like the issue is that we're hardcoding how the :continuous
annotation gets parsed by the macro:
Gen.jl/src/inference/trace_translators.jl
Lines 182 to 194 in b959223
Gen.jl/src/inference/trace_translators.jl
Lines 169 to 180 in b959223
The fixed definition would be something like:
macro read(src, ann)
_typed = GlobalRef(Gen, :typed)
return quote read($(esc(bij_state)), $(esc(src)), $(_typed)($(esc(ann.value)))) end
end
The downside is that it would lead to a somewhat slower dynamic call to the typed
function at run-time, instead of handling that logic at compile time. I'm not sure how much slower, but perhaps it's worth not making the switch and just clearly documenting that the user has to directly specify whether they want something to be :continuous
or :discrete
.
from gen.jl.
Related Issues (20)
- Migrate tests from Travis CI to Github Actions HOT 1
- Update test cases to prevent platform-specific variability
- Documentation Github job is skipping deployment to gh-pages on merge to master HOT 14
- Fixing failing doctests found by Documenter.jl
- Move docs from "gen.dev" to "gen.dev/docs" HOT 3
- Simplified import from `Distributions.jl` HOT 2
- Bug in `logpdf_grad` implementation of `@dist` DSL distributions. HOT 1
- Missing visualization/regression_viz.jl HOT 1
- Fixing the value range that learnable parameters can take when being optimised HOT 5
- Type signature of HeterogeneousMixture HOT 1
- When should one use Gen.jl over other PPLs such as pyro or PyMC? HOT 3
- Incorrect Dynamic DSL `update` Implementation on the Prox Base Branch HOT 7
- Create new tagged release HOT 4
- Error in documentation of `regenerate`? HOT 1
- Error in `discard` returned by `update` for DynamicDSLTrace with hierarchical addresses HOT 3
- SMC likelihood tempering?
- `_from_array` impl for vector doesn't handle nested elements HOT 2
- Gen.set_submap! breaks for non-`DynamicChoiceMap` submaps HOT 2
- `Gen.choicemap` constructor assigns choice-map args as leaves HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gen.jl.