sktime: [BUG] `DartsRegressionModel` can not be used if `u8darts` is not installed even if `darts` is installed

In darts adapter, u8darts is mentioned as the dependency since it has smaller dependency set than full darts. But darts is a proper superset of u8darts and both gets imported as import darts only. Therefore as a user if I have darts installed, my expectation is I should be able to use DartsRegressionModel. However, that is failing with ModuleNotFoundError.

To reproduce, please follow the following steps:

  1. Activate a python environment where sktime is installed, u8darts is not installed, and darts is installed.
  2. Run following code snippet.
  3. It should fail with ModuleNotFoundError: DartsRegressionModel requires package 'u8darts>=0.29' to be present in the python environment, but 'u8darts>=0.29' was not found. 'u8darts>=0.29' is a soft dependency and not included in the base sktime installation. Please run: `pip install u8darts>=0.29` to install the u8darts>=0.29 package. To install all soft dependencies, run: `pip install sktime[all_extras]`.
from sktime.forecasting.darts import DartsRegressionModel
DartsRegressionModel()

I am currently on main branch at commit 0f75b7ad0.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (11 by maintainers)

Commits related to this issue

Most upvoted comments

FYI @fnhirwa for Darts FYI @fkiraly for general enhancement scope for dependency management