Skip to content

Instantly share code, notes, and snippets.

@canyon289
Last active April 12, 2021 14:41
Show Gist options
  • Save canyon289/28dfa9fa5e4122cf332960090501251f to your computer and use it in GitHub Desktop.
Save canyon289/28dfa9fa5e4122cf332960090501251f to your computer and use it in GitHub Desktop.

model.py

Context Manager

https://github.com/pymc-devs/pymc3/blob/master/pymc3/model.py#L277

One of the important pieces of code that handles variable instantion I think.

TODO:

  • Find where RVs register themselves with this context.
  • Be able to articulate how the context manager works

Factor

https://github.com/pymc-devs/pymc3/blob/master/pymc3/model.py#L409 Implements the interface for things that have logps associated with them like RVs or models

GradientValueFunction

https://github.com/pymc-devs/pymc3/blob/v4/pymc3/model.py#L340 Probably gets the gradient and gets a value. Need to dig into this further

Model

https://github.com/pymc-devs/pymc3/blob/v4/pymc3/model.py#L495 This is where the meat is at

model.register_rv

https://github.com/pymc-devs/pymc3/blob/v4/pymc3/model.py#L906

model.point_logps

https://github.com/pymc-devs/pymc3/blob/v4/pymc3/model.py#L1364

Short todo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment