Skip to content

[FIX] #458 warn on timestamp gaps (best-effort, backend-safe)#570

Open
W057 wants to merge 1 commit intoNixtla:mainfrom
W057:fix/issue-458-gap-warnings
Open

[FIX] #458 warn on timestamp gaps (best-effort, backend-safe)#570
W057 wants to merge 1 commit intoNixtla:mainfrom
W057:fix/issue-458-gap-warnings

Conversation

@W057
Copy link
Contributor

@W057 W057 commented Feb 18, 2026

Summary

  • Add gap diagnostics in TimeSeries._fit via _check_gaps/_warn_gaps.
  • Warn with truncated id lists and stacklevel=2 for actionable messages.
  • Make gap checks best-effort (do not break fit if backend-specific dtype/freq offseting fails).
  • Add tests for datetime/integer gaps, clean data, id-specific warnings, and truncation behavior.

Why

Users can silently compute lag features over positional order when timestamps have gaps. This adds explicit warnings without making fitting brittle.

Tests

  • /home/welink/dev/work/Nixtla/mlforecast/.venv/bin/pytest --no-cov tests/test_core.py -k check_gaps -vv

Closes #458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core] warn about gaps in series

1 participant