-
Notifications
You must be signed in to change notification settings - Fork 473
Description
Hi NeuralForecast team,
I noticed some confusing behavior in the progress bar during the fit process.
-
Misleading Epoch increment: Based on my tests, the Epoch counter seems to increment after iterating through all series batches (defined by batch_size), even if the model has not yet traversed the full dataset. Specifically, an "epoch" appears to be counted once a single pass of windows_batch_size is taken from each series in the current batch, rather than a full pass over all available windows in the data. This might mislead users regarding the actual training progress.
-
Clarification on "-2": In the progress bar display (e.g., Epoch 499/-2), what does the -2 signify? It doesn't seem to represent the total epochs or steps, and I couldn't find a clear explanation in the documentation.
Reproducible Code:
import pandas as pd
from neuralforecast import NeuralForecast
from neuralforecast.models import NHITS
Y_df = pd.read_csv('https://datasets-nixtla.s3.amazonaws.com/ERCOT-clean.csv')
Y_df['ds'] = pd.to_datetime(Y_df['ds'])
df = pd.concat([Y_df.assign(unique_id=i) for i in range(4)])
horizon = 24
models = [NHITS(h=horizon, input_size=24, batch_size=2, windows_batch_size=4, max_steps=1000)]
nf = NeuralForecast(models=models, freq='h')
nf.fit(df=df)
models = [NHITS(h=horizon, input_size=24, batch_size=1, windows_batch_size=4, max_steps=1000)]
nf = NeuralForecast(models=models, freq='h')
nf.fit(df=df)
Observed Progress Bar:
Plaintext
Epoch 499/-2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2/2 ... train_loss_epoch: 2783.742
Epoch 249/-2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4/4 ... train_loss_epoch: 3284.213
Could you please clarify the logic behind the epoch counting in the progress bar and the meaning of the -2 value?
Thanks in advance