facebook / facebook/prophet

Prophet fails to run while being called in a Ray cluster

Open
#2,187 1 comment 1 reaction 0 assignees View on GitHub
question
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

I'm running my program in a Ray cluster and its working fine, the details are:
python 3.9
latest conda prophet version
latest ray version
I'm calling prophet to predict a time series in a loop. this loop has been turned into a pool map object so that i can parallelize it. here is a snippet of the code:

```
def prediction(df):
warnings.simplefilter("ignore", DeprecationWarning)
warnings.simplefilter("ignore", FutureWarning)
logging.getLogger('prophet').setLevel(logging.ERROR)
fit_data=pd.DataFrame({'ds':df.index,'y':df['GWL'].values})
model = Prophet()
with suppress_stdout_stderr():
model.fit(fit_data)
future = model.make_future_dataframe(periods=periods, freq='MS')
forecast = model.predict(future)
dff=forecast[['ds','yhat']].set_index('ds')
return dff

results = pool.map(prediction, [x for x in datasetgroup])
```
this code works just fine if i run it using python Multiproccessing module, but fails with the following ERROR when i run it using ray:

`AttributeError: 'Prophet' object has no attribute 'stan_backend'`

i have been wondering if i should post it in ray github or yours but since the error mentioned stan_backend i thought it would be more reasonable to mention it here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.