Skip to content

Commit

Permalink
Merge pull request #81 from Nixtla/fix/input_size_check
Browse files Browse the repository at this point in the history
[FIX] Use min size
  • Loading branch information
AzulGarza authored Aug 16, 2023
2 parents f390d9c + 8b87d2c commit dc4f524
Show file tree
Hide file tree
Showing 2 changed files with 535 additions and 52 deletions.
585 changes: 534 additions & 51 deletions nbs/timegpt.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion nixtlats/timegpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def _validate_input_size(
require_history: bool,
):
if require_history:
min_history = Y_df.groupby("unique_id").size().mean()
min_history = Y_df.groupby("unique_id").size().min()
if min_history < input_size + model_horizon:
raise Exception(
"Your time series data is too short "
Expand Down

0 comments on commit dc4f524

Please sign in to comment.