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

Reducing StatsForecast Size #600

Merged
merged 8 commits into from
Aug 15, 2023
Merged

Reducing StatsForecast Size #600

merged 8 commits into from
Aug 15, 2023

Conversation

kvnkho
Copy link
Collaborator

@kvnkho kvnkho commented Aug 4, 2023

There are some issues saying that the size of StatsForecast is too inconvenient for AWS Lambda. See this and this. The package sits at 700 MB.

We can check the size of the dependencies below. Note that Spark, Dask, and Ray are dev dependencies. Plotly (and Dash) are core dependencies.

Screen Shot 2023-08-04 at 12 03 38 AM

This pull request removes plotly as a core dependency in favor of matplotlib being the default.

The second thing is that the build includes all source notebooks (docs and source). The docs folder is around 70-75MB. Removing the docs will also save a lot of space, especially because the docs contain plotly images.

Note:

I had to change the test to pass. It has to do with Plotly and Matplotlib not having 1:1 parity with behavior. It's somewhat ok for now because the syntax will slightly differ, but users are unlikely to use both anyway. I can open another issue for that.

EDIT: Docs are actually not included in the build already because there is no init.py . Action files are but they are so small anyway it doesn't matter.

@kvnkho kvnkho requested a review from AzulGarza August 4, 2023 05:38
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

statsforecast/core.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
kvnkho and others added 2 commits August 15, 2023 14:07
Co-authored-by: José Morales <jmoralz92@gmail.com>
Copy link
Member

@jmoralez jmoralez left a comment

Choose a reason for hiding this comment

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

LGTM. I'm adding the breaking label because if someone is relying on statsforecast installing plotly and having it as the default backend this will require them to add it as a dependency and setting the engine argument.

@kvnkho
Copy link
Collaborator Author

kvnkho commented Aug 15, 2023

LGTM. I'm adding the breaking label because if someone is relying on statsforecast installing plotly and having it as the default backend this will require them to add it as a dependency and setting the engine argument.

Yep that's right, unfortunately.

@kvnkho kvnkho merged commit b59d435 into main Aug 15, 2023
16 checks passed
@kvnkho kvnkho deleted the feat/reducing_package branch August 15, 2023 20:18
@DaveParr
Copy link
Contributor

Looking forward to using this, thanks for the effort. 👍🏻

@nelsoncardenas
Copy link
Contributor

Awesome job!

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