Skip to content

Fix bug in transformed scan variables #6573

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

Merged

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Mar 7, 2023

This would happen when scans have different outputs with mixed transforms (e.g., None and LogOddsTransform), as it was using only the transform of the last variable, due to a typo

def scan_step(prev_innov):
next_innov = at.random.beta(prev_innov * 10, (1 - prev_innov) * 10)
update = {next_innov.owner.inputs[0]: next_innov.owner.outputs[0]}
return next_innov, update
Copy link
Member Author

@ricardoV94 ricardoV94 Mar 7, 2023

Choose a reason for hiding this comment

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

Adding more (non-probability related) outputs to scan showcases the bug.

Updates are a common output in real scan uses, so this is both more realistic and covers the fixed bug

@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Merging #6573 (1e6f11c) into main (534a9ae) will increase coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #6573   +/-   ##
=======================================
  Coverage   92.01%   92.01%           
=======================================
  Files          91       91           
  Lines       15108    15108           
=======================================
+ Hits        13901    13902    +1     
+ Misses       1207     1206    -1     
Impacted Files Coverage Δ
pymc/logprob/transforms.py 96.35% <ø> (+0.21%) ⬆️

@ricardoV94 ricardoV94 requested a review from twiecki March 7, 2023 13:21
@ricardoV94 ricardoV94 merged commit e76bba9 into pymc-devs:main Mar 7, 2023
@ricardoV94 ricardoV94 deleted the fix_transform_scan_values_bug branch June 6, 2023 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants