-
Notifications
You must be signed in to change notification settings - Fork 252
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
Enable transform _sample_curve
to work with VariableFactory
#1362
Enable transform _sample_curve
to work with VariableFactory
#1362
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1362 +/- ##
==========================================
- Coverage 95.31% 95.31% -0.01%
==========================================
Files 47 47
Lines 4913 4912 -1
==========================================
- Hits 4683 4682 -1
Misses 230 230 ☔ View full report in Codecov by Sentry. |
8b6eff4
to
78b028d
Compare
78b028d
to
0a56807
Compare
|
||
|
||
def test_transform_sample_curve_with_variable_factory(): | ||
class Example(VariableFactory): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You dont need to inherit fyi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lucianopaz !
Description
The core problem was that the transform's
_sample_curve
method created aModel
instance that didn't have access to all of the required coordinate information. The secondary issue that I addressed was to automatically determine the expected core dimensions of the transformation's output. The way this used to work was very brittle because it relied on expecting thefunction_parameters
to be stored in theparameters
dataset. The method I used just relies on the meta information of the parameters'dims
.Related Issue
mmm.components.base.Transformation._sample_curve
doesn't use all of the dataset coordinates #1360Checklist
Modules affected
Type of change
📚 Documentation preview 📚: https://pymc-marketing--1362.org.readthedocs.build/en/1362/