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

migrate ETS to C++ #757

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

migrate ETS to C++ #757

wants to merge 26 commits into from

Conversation

jmoralez
Copy link
Member

@jmoralez jmoralez commented Jan 12, 2024

Contributes to #753 by moving the functions that used numba in the ETS model to C++. Several changes had to be made to the library for this to work:

  • Migrate from setup.py to pyproject.toml (to use scikit-build-core)
  • Move the python package to a python folder. This is so that when running the tests from the root of the repository it uses the installed statsforecast package instead of the code from the statsforecast folder. With a regular python package these would be the same, however since we're now shipping a shared library these two are now different (the installed package has the shared library and the statsforecast folder doesn't).
  • The tests now build the wheels first for the platforms that we'll support (windows amd64, macos x864_64, macos arm64, linux x86_64, linux aarch64 (arm64)) and then run the tests installing from that. These wheels will be published to s3 on pushes to main so that people can install from those without needing a compiler (the install notebook has instructions on how to do this).
  • Updated the python-publish action to build the wheels for the same platforms as in the previous point.
  • Added cmake, ninja and scikit-build-core to the environment, which are used to build the shared library.
  • Moved the restrict_to_bounds function and the results tuple from ETS to utils. These will be removed once we migrate all the models that use numba to C++.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jmoralez jmoralez marked this pull request as ready for review January 17, 2024 23:32
@jmoralez jmoralez marked this pull request as draft January 19, 2024 23:59
@jmoralez
Copy link
Member Author

Pinning pandas version because of this.

@jmoralez jmoralez marked this pull request as ready for review January 22, 2024 19:27
Copy link
Member

@AzulGarza AzulGarza left a comment

Choose a reason for hiding this comment

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

awesome @jmoralez! thank you :)

just a minor comment, could you update the CONTRIBUTING.md file to reflect these changes? i think in this case it should be particular to statsforecast (for example: how to add a new model written in C++).❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants