facebook / facebook/prophet

Unable to run cross-validation in parallel mode "processes"

Aperta
#1,884 11 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
20.4k
Fork
4.6k
Merge medio
19h 52m
PR unite (30g)
1

Descrizione

Hello, I'm using Prophet v1.0 with Anaconda3 2020.11 on Windows 10 64-bit. I'm trying to run cross-validation in parallel mode "processes" using the example provided in the documentation, but I always get this error message (the
[error.log](https://github.com/facebook/prophet/files/6386380/error.log) is very long so I attached it instead of pasting it here). The code I used:

```
import pandas as pd
import itertools
import numpy as np
from prophet import Prophet
from prophet.diagnostics import cross_validation
from prophet.diagnostics import performance_metrics

df = pd.read_csv("example_wp_log_peyton_manning.csv")

param_grid = {
"changepoint_prior_scale": [0.001, 0.01, 0.1, 0.5],
"seasonality_prior_scale": [0.01, 0.1, 1.0, 10.0],
}

# Generate all combinations of parameters
all_params = [dict(zip(param_grid.keys(), v)) for v in itertools.product(*param_grid.values())]
rmses = [] # Store the RMSEs for each params here

# Use cross validation to evaluate all parameters
for params in all_params:
m = Prophet(**params).fit(df) # Fit model with given params
df_cv = cross_validation(m, horizon="30 days", parallel="processes")
df_p = performance_metrics(df_cv, rolling_window=1)
rmses.append(df_p["rmse"].values[0])

# Find the best parameters
tuning_results = pd.DataFrame(all_params)
tuning_results["rmse"] = rmses
print(tuning_results)
```

If I run the code on Google Colab then everything is fine.

So can anyone help please? Thank you.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.