Open eb8680 opened 6 years ago
To help guide this effort, I'd like to take a look at some long-term goals:
newton_step()
and Newton
look more like SVI
or TracePosterior
MarginalAssignment
and friends look more like SVI
or TracePosterior
SVI.differentiable_loss()
inside newton_step()
or Newton
HMC
EmpiricalMarginal
This issue is for discussing instances of cruft or technical debt in SVI-related code and proposed fixes. We can create new issues for individual instances if needed, and add or remove items from this list as we decide what to focus on.
Potential issues/fixes:
*ELBO._get_traces
logic into a single set of functions ininfer.enum
, as suggested in e.g. #1214. Ideally we could also use the same code as part of #1226 and #1128. (Issue moved from #1227 and work started in #1230)infer.enum.iter_discrete_traces
SVI.evaluate_loss
in favor of callingloss(...)
directlyTrace*_ELBO.loss
functionality into one place, e.g.ELBO.loss
infer.ELBO
functionality into reusable functions that can be used outside SVI e.g. inImportance
check_model_guide_match
,check_site_shape
) so that it's more composableParamStore
andPyroOptim
by removingparam_name()
and related internals mapping from parameters to namesParamStore
moredict
-like by replacing current interface with__getitem__
/__setitem__
/update
, or even just make it a subclass ofdict
iarange
andirange
look like more other side effects, i.e. make them intoMessenger
s, including a functional interfaceTrace
data structure in favor of a simpleOrderedDict