Nixtla / mlforecast

Scalable machine 🤖 learning for time series forecasting.
https://nixtlaverse.nixtla.io/mlforecast
Apache License 2.0
841 stars 80 forks source link

[Utils] Add "packaging" to the package dependencies #234

Closed nicolasgorrity closed 11 months ago

nicolasgorrity commented 11 months ago

What happened + What you expected to happen

Bug:

The function utils._ensure_shallow_copy makes a direct import of the package packaging. However, the packaging package is not listed in mlforecast python dependencies.

This causes the preprocessing to raise an import error in a minimal working virtual environment where packaging is not already installed.

Expected behavior:

Versions / Dependencies

Reproduction script

Script to check the issue:

virtualenv venv -p python3.11
source venv/bin/activate
pip install mlforecast
pip show packaging

Output:

WARNING: Package(s) not found: packaging

Issue Severity

Low: It annoys or frustrates me.