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

support xarray in ModelBuilder #1459

Merged
merged 15 commits into from
Feb 3, 2025
Merged

support xarray in ModelBuilder #1459

merged 15 commits into from
Feb 3, 2025

Conversation

wd60622
Copy link
Contributor

@wd60622 wd60622 commented Feb 3, 2025

Description

Expanding the support of the ModelBuilder to include xarray types

The create_fit_data method in the ModelBuilder class acts to generate the data that will be used to fit the model. There will be a base implementation. However, the user can override this method without touching fit directly.

The _generate_and_process_model_data is no longer required method of the ModelBuilder class. The build_model method can do this directly or the user has the ability to make custom methods which can act similarly.

Related Issue

  • Closes #
  • Related to #

Checklist


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

@github-actions github-actions bot added CLV tests ModelBuilder Related to the ModelBuilder class and its children labels Feb 3, 2025
@wd60622 wd60622 requested a review from cetagostini February 3, 2025 09:23
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.75%. Comparing base (23ea2b6) to head (0ca959e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1459      +/-   ##
==========================================
+ Coverage   94.63%   94.75%   +0.12%     
==========================================
  Files          50       50              
  Lines        5458     5457       -1     
==========================================
+ Hits         5165     5171       +6     
+ Misses        293      286       -7     

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

@wd60622 wd60622 added the enhancement New feature or request label Feb 3, 2025
@wd60622 wd60622 requested a review from juanitorduz February 3, 2025 13:14
@wd60622 wd60622 changed the title support xarray support xarray in ModelBuilder Feb 3, 2025
Copy link
Contributor

@cetagostini cetagostini left a comment

Choose a reason for hiding this comment

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

No comments, awesome!

@wd60622 wd60622 requested a review from ColtAllen February 3, 2025 15:44
@wd60622
Copy link
Contributor Author

wd60622 commented Feb 3, 2025

Tagging @ColtAllen since he said that it is related to CLV PRs

Copy link
Collaborator

@ColtAllen ColtAllen left a comment

Choose a reason for hiding this comment

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

I think the required CLV changes will need to be done in a separate PR, because other than the updated type hints for build_model, none of the revised ModelBuilder methods are being used in the CLV module.

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.

🙌

@juanitorduz juanitorduz merged commit 79a8008 into main Feb 3, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLV enhancement New feature or request ModelBuilder Related to the ModelBuilder class and its children tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants