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

Save off media transformations #882

Merged
merged 8 commits into from
Jul 30, 2024
Merged

Conversation

wd60622
Copy link
Contributor

@wd60622 wd60622 commented Jul 28, 2024

Description

Add to_dict method for media transformation and leverage in the MMM in order to save off configurations completely

Related Issue

Checklist

Modules affected

  • MMM
  • CLV

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pymc-marketing--882.org.readthedocs.build/en/882/

@wd60622 wd60622 added bug Something isn't working MMM labels Jul 28, 2024
@wd60622 wd60622 added this to the 0.8.0 milestone Jul 28, 2024
@wd60622 wd60622 requested a review from juanitorduz July 28, 2024 10:56
Copy link

codecov bot commented Jul 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.58%. Comparing base (7a89f27) to head (6a61dc7).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #882      +/-   ##
==========================================
+ Coverage   94.52%   94.58%   +0.05%     
==========================================
  Files          33       33              
  Lines        3345     3378      +33     
==========================================
+ Hits         3162     3195      +33     
  Misses        183      183              

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

@wd60622 wd60622 mentioned this pull request Jul 28, 2024
13 tasks
Copy link
Collaborator

@juanitorduz juanitorduz left a comment

Choose a reason for hiding this comment

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

Thanks @wd60622

@juanitorduz
Copy link
Collaborator

@wd60622 we can merge this one after we you solve the merge conflicts :)

@wd60622
Copy link
Contributor Author

wd60622 commented Jul 29, 2024

pre-commit.ci autofix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any thoughts on this change? @juanitorduz

If the adstock and saturation keys are not present than we could inject a default. However, I am not sure that is good idea

Copy link
Collaborator

Choose a reason for hiding this comment

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

Well, I think we need this to recover the model after saving it, right? What could be the drawbacks of injecting the default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Injecting a default would likely not recreate the same model at all

@wd60622
Copy link
Contributor Author

wd60622 commented Jul 29, 2024

Any idea if the model version attribute needs to be updated?

@juanitorduz
Copy link
Collaborator

Any idea if the model version attribute needs to be updated?

We actually do not have any explicit convention. I usually do it when there is a big refactor, but we can change that.

@wd60622 wd60622 merged commit ac645c9 into main Jul 30, 2024
12 checks passed
@wd60622 wd60622 deleted the save-off-media-transformations branch July 30, 2024 09:31
radiokosmos pushed a commit to radiokosmos/pymc-marketing that referenced this pull request Sep 3, 2024
* to_dict via lookup_name

* parse to and from dict for attrs

* improve the codecov

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* change test with change in default behavior

* increase the MMM model version

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
twiecki pushed a commit that referenced this pull request Sep 10, 2024
* to_dict via lookup_name

* parse to and from dict for attrs

* improve the codecov

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* change test with change in default behavior

* increase the MMM model version

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
twiecki pushed a commit that referenced this pull request Sep 10, 2024
* to_dict via lookup_name

* parse to and from dict for attrs

* improve the codecov

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* change test with change in default behavior

* increase the MMM model version

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MMM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

saving with media transformation config
2 participants