Skip to content

Use prophet (1.0) instead of fbprophet (0.7) #134

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions kats/data/README
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ Please note: it's always dangerous to upload data set to fbcode, so please
keep the data set as small as possible, it's just for testing purpose.

1. air_passengers.csv
See more details from fbprophet github: https://github.com/facebook/prophet/tree/master/examples
See more details from prophet github: https://github.com/facebook/prophet/tree/master/examples
2. mean_change_detection_test.csv
Simulated example time series to test mean change detection. The real change point for
increase change is 30 and 50 for decrease. See n165038 for how to generated the time series.
3. cdn_working_set.csv
4. multi_ts.csv
5. peyton_manning.csv
See more details from fbprophet github: https://github.com/facebook/prophet/tree/master/examples
See more details from prophet github: https://github.com/facebook/prophet/tree/master/examples
6. retail_sales.csv
See more details from fbprophet github: https://github.com/facebook/prophet/tree/master/examples
See more details from prophet github: https://github.com/facebook/prophet/tree/master/examples
7. yosemite_temps.csv
See more details from fbprophet github: https://github.com/facebook/prophet/tree/master/examples
See more details from prophet github: https://github.com/facebook/prophet/tree/master/examples
6 changes: 3 additions & 3 deletions kats/detectors/prophet_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import pandas as pd

try:
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

_no_prophet = False
except ImportError:
Expand Down Expand Up @@ -144,7 +144,7 @@ def __init__(
uncertainty_samples: float = 50,
) -> None:
if _no_prophet:
raise RuntimeError("requires fbprophet to be installed")
raise RuntimeError("requires prophet to be installed")
if serialized_model:
self.model = model_from_json(serialized_model)
else:
Expand Down
6 changes: 3 additions & 3 deletions kats/models/prophet.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pandas as pd

try:
from fbprophet import Prophet
from prophet import Prophet

_no_prophet = False
except ImportError:
Expand Down Expand Up @@ -102,7 +102,7 @@ def __init__(
custom_seasonalities: Optional[List[Dict]] = 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 @@ -205,7 +205,7 @@ class ProphetModel(m.Model):
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")
if not isinstance(self.data.value, pd.Series):
msg = "Only support univariate time series, but get {type}.".format(
type=type(self.data.value)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ python-dateutil>=2.8.0
scikit-learn>+0.24.2
seaborn>=0.11.1
setuptools-git>=1.2
statsmodels>=0.12.2
statsmodels>=0.12.2,<0.13.0
2 changes: 1 addition & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
LunarCalendar>=0.0.9
botorch==0.3.2
ax-platform==0.1.18
fbprophet==0.7
prophet==1.0
neuralprophet>=0.2.7
gpytorch==1.2.1
holidays>=0.10.2
Expand Down