Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

load bug with y name different than output_var #1468

Merged
merged 5 commits into from
Feb 4, 2025

Conversation

wd60622
Copy link
Contributor

@wd60622 wd60622 commented Feb 4, 2025

Description

Found this while making the tests use mocked pm.sample

If y already has a name, then load_from_idata method would raise a KeyError

Related Issue

  • Closes #
  • Related to #

Checklist


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

@github-actions github-actions bot added tests ModelBuilder Related to the ModelBuilder class and its children labels Feb 4, 2025
@wd60622 wd60622 added the bug Something isn't working label Feb 4, 2025
@wd60622 wd60622 requested a review from juanitorduz February 4, 2025 13:20
@wd60622 wd60622 changed the title load bug with different y name' load bug with different y name different than output_var Feb 4, 2025
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.75%. Comparing base (0eb7841) to head (e866c0e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1468      +/-   ##
==========================================
+ Coverage   94.68%   94.75%   +0.07%     
==========================================
  Files          50       50              
  Lines        5457     5456       -1     
==========================================
+ Hits         5167     5170       +3     
+ Misses        290      286       -4     

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

@wd60622 wd60622 changed the title load bug with different y name different than output_var load bug with y name different than output_var Feb 4, 2025
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.

Thank @wd60622

@juanitorduz
Copy link
Collaborator

We have some failing tests

FAILED tests/mmm/test_mmm.py::TestMMM::test_get_group_predictive_data[scaled-prior_predictive] - RuntimeError: Make sure the model has been fitted and the prior_predictive has been sampled!
FAILED tests/mmm/test_mmm.py::TestMMM::test_get_group_predictive_data[scaled-posterior_predictive] - assert 10 == 500
FAILED tests/mmm/test_mmm.py::TestMMM::test_get_group_predictive_data[original-scale-prior_predictive] - RuntimeError: Make sure the model has been fitted and the prior_predictive has been sampled!
FAILED tests/mmm/test_mmm.py::TestMMM::test_get_group_predictive_data[original-scale-posterior_predictive] - assert 10 == 500

@wd60622 wd60622 merged commit eb3b6b6 into main Feb 4, 2025
19 checks passed
@wd60622 wd60622 deleted the load-bug-different-y-name branch February 4, 2025 14:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working ModelBuilder Related to the ModelBuilder class and its children tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants