Skip to content
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

Fix Critical Bug in Guides #97

Merged
merged 2 commits into from
Aug 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cellij/core/_pyro_guides.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _mean_log_normal(self, site_name: str) -> torch.Tensor:
return (loc + scale.pow(2) / 2).exp()

def _median_log_normal(self, site_name: str) -> torch.Tensor:
loc, scale = self._get_loc_and_scale(site_name)
loc, _ = self._get_loc_and_scale(site_name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, ackchyually we do not need scale

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title was only a joke :D

return loc.exp()

def _mode_log_normal(self, site_name: str) -> torch.Tensor:
Expand Down Expand Up @@ -360,7 +360,7 @@ def _get_q_dists(self, priors: dict[str, PDist]) -> dict[str, QDist]:
_q_dists = {}

for group, prior in priors.items():
# Replace strings with actuals priors
# Replace strings with actual priors
_q_dists[group] = {
"InverseGammaP": InverseGammaQ,
"NormalP": NormalQ,
Expand Down
Loading