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

[FEAT] Core Numeric Type and Null Protections #181

Merged
merged 7 commits into from
Apr 19, 2023
Merged

[FEAT] Core Numeric Type and Null Protections #181

merged 7 commits into from
Apr 19, 2023

Conversation

dluuo
Copy link
Contributor

@dluuo dluuo commented Apr 17, 2023

When a Y_hat_df is passed into HierarchicalForecast.reconcile() without numeric types, it leads to a silent bug where the reconcile takes extremely long and then throws an error.
I added a type check in the .reconcile (core.ipynb) which throws an exception if the Y_hat_df does not have numeric types
I also added a NaN/None check in the .reconcile (core.ipynb) which throws an exception if the Y_hat_df has null values

I also added a NaN/None check in the aggregate function (utils.ipynb) which throws an exception if the Y_hat_df has null values

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Collaborator

@kdgutier kdgutier left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution.

  • Can you add a test_fail unit test simulating the expected behavior of the protection? For a reference check the example on "different series S and Y_hat_df" in the same nbs/core.ipynb notebook.
  • Let's add a Null protection to the target variable too.

@kdgutier kdgutier linked an issue Apr 17, 2023 that may be closed by this pull request
@kdgutier kdgutier changed the title Added Numeric Type Protection [FEAT] Core Numeric Type and Null Protections Apr 17, 2023
@kdgutier kdgutier merged commit bcee993 into Nixtla:main Apr 19, 2023
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