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

188 random walk refactor #275

Merged
merged 38 commits into from
Jul 22, 2024
Merged

188 random walk refactor #275

merged 38 commits into from
Jul 22, 2024

Conversation

dylanhmorris
Copy link
Collaborator

@dylanhmorris dylanhmorris commented Jul 18, 2024

This addresses #188 and in the process attempts to move things in the direction of the proposed RV design spec from #266

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 95.55556% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.80%. Comparing base (ef87238) to head (71bd146).

Files Patch % Lines
model/src/pyrenew/metaclass.py 96.96% 1 Missing ⚠️
model/src/pyrenew/process/simplerandomwalk.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #275   +/-   ##
=======================================
  Coverage   92.79%   92.80%           
=======================================
  Files          40       39    -1     
  Lines         902      903    +1     
=======================================
+ Hits          837      838    +1     
  Misses         65       65           
Flag Coverage Δ
unittests 92.80% <95.55%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@damonbayer
Copy link
Collaborator

damonbayer commented Jul 18, 2024

What is the idea behind TransformedRandomVariable? Why not just create a DistributionalRV with a TransformedDistribution as the dist? Or even use TransformedDistribution as the implementation for the TransformedRandomVariable if you are trying to make a different interface.

@dylanhmorris
Copy link
Collaborator Author

dylanhmorris commented Jul 18, 2024

What is the idea behind TransformedRandomVariable? Why not just create a DistributionalRV with a TransformedDistribution as the dist? Or even use TransformedDistribution as the implementation for the TransformedRandomVariable if you are trying to make a different interface.

We may wish to apply transformations to the output of RandomVariable.sample() calls for RVs other than DistributionalRVs. Indeed, in the examples here we use TransformedRandomVariable to transform the output of SimpleRandomWalk, which is not implemented as a numpyro.distributions.Distribution or as a DistributionalRV.

@dylanhmorris dylanhmorris marked this pull request as ready for review July 19, 2024 19:52
model/pyproject.toml Outdated Show resolved Hide resolved
@dylanhmorris dylanhmorris requested a review from damonbayer July 22, 2024 19:41
@dylanhmorris
Copy link
Collaborator Author

@damonbayer ready for re-review

Copy link
Collaborator

@damonbayer damonbayer left a comment

Choose a reason for hiding this comment

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

Thanks @dylanhmorris! A few small comments. Nothing mandatory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants