Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kats/detectors/prophet_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import numpy as np
import pandas as pd
from fbprophet import Prophet
from fbprophet.serialize import model_from_json, model_to_json
from prophet import Prophet
from prophet.serialize import model_from_json, model_to_json
from kats.consts import DEFAULT_VALUE_NAME, TimeSeriesData
from kats.detectors.detector import DetectorModel
from kats.detectors.detector_consts import AnomalyResponse, ConfidenceBand
Expand Down
4 changes: 2 additions & 2 deletions kats/detectors/threshold_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import numpy as np
import pandas as pd
from fbprophet import Prophet
from fbprophet.serialize import model_from_json, model_to_json
from prophet import Prophet
from prophet.serialize import model_from_json, model_to_json
from kats.consts import DEFAULT_VALUE_NAME, TimeSeriesData
from kats.detectors.detector import DetectorModel
from kats.detectors.detector_consts import AnomalyResponse
Expand Down
6 changes: 3 additions & 3 deletions kats/models/prophet.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pandas as pd

try:
from fbprophet import Prophet
from prophet import Prophet

_no_prophet = False
except ImportError:
Expand Down Expand Up @@ -131,7 +131,7 @@ def __init__(
extra_regressors: Optional[List[Dict[str, Any]]] = None,
) -> None:
if _no_prophet:
raise RuntimeError("requires fbprophet to be installed")
raise RuntimeError("requires prophet to be installed")
super().__init__()
self.growth = growth
self.changepoints = changepoints
Expand Down Expand Up @@ -244,7 +244,7 @@ class ProphetModel(Model[ProphetParams]):
def __init__(self, data: TimeSeriesData, params: ProphetParams) -> None:
super().__init__(data, params)
if _no_prophet:
raise RuntimeError("requires fbprophet to be installed")
raise RuntimeError("requires prophet to be installed")
self.data: TimeSeriesData = data
self._data_params_validation()

Expand Down
4 changes: 2 additions & 2 deletions kats/tests/models/test_prophet_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ def setUpClass(cls) -> None:

# pyre-fixme[2]: Parameter annotation cannot be `Any`.
def mock_prophet_import(module: Any, *args: Any, **kwargs: Any) -> None:
if module == "fbprophet":
if module == "prophet":
raise ImportError
else:
return original_import_fn(module, *args, **kwargs)

cls.mock_imports = patch("builtins.__import__", side_effect=mock_prophet_import)

def test_fbprophet_not_installed(self) -> None:
def test_prophet_not_installed(self) -> None:
# Unload prophet module so its imports can be mocked as necessary
del sys.modules["kats.models.prophet"]

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ matplotlib>=2.0.0
numpy>=1.21,<1.22
pandas>=1.0.4,<=1.3.5
python-dateutil>=2.8.0
pystan==2.19.1.1
fbprophet==0.7.1
prophet==1.1
neuralprophet==0.3.2
scikit-learn>=0.24.2
scipy<1.8.0
Expand Down
3 changes: 1 addition & 2 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
LunarCalendar>=0.0.9
ax-platform==0.2.4
pystan==2.19.1.1
fbprophet==0.7.1
prophet==1.1
gpytorch
holidays>=0.10.2
numba>=0.52.0
Expand Down