Skip to content

fix: skip silent daily fallback for unknown freq - #553

Closed
Saswatsusmoy wants to merge 1 commit into
sktime:mainfrom
Saswatsusmoy:Saswatsusmoy/313-format-silent-daily
Closed

fix: skip silent daily fallback for unknown freq#553
Saswatsusmoy wants to merge 1 commit into
sktime:mainfrom
Saswatsusmoy:Saswatsusmoy/313-format-silent-daily

Conversation

@Saswatsusmoy

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #313

Supersedes the approach in #314 (no tests, stale against current format_data_handle).

What does this implement/fix? Explain your changes.

When pd.infer_freq fails, format_data_handle mapped any unrecognized mode interval to freq="D", then reindexed the full span and forward/back-filled. That is on by default (SKTIME_MCP_AUTO_FORMAT=true).

  • Irregular bi-weekly (8 points) became 99 fabricated daily rows
  • 15-minute series with one gap collapsed to 1 row (date_range(..., freq="D") over a sub-day span)
  • transform_data reported this as a successful cleanup (Inferred and set frequency to 'D')

The catch-all now leaves frequency unset, skips reindex, and puts a frequency_warning in changes_made. transform_data forwards that warning in changes_applied. Known intervals (daily with a gap, etc.) still fill as before.

Does your contribution introduce a new dependency? If yes, which one?

No.

What should a reviewer concentrate their feedback on?

  • else in the manual freq chain no longer assigns "D"
  • Warning is visible on the MCP transform_data path, not only the executor dict
  • 15-minute collapse vs bi-weekly expansion, and the daily-gap regression

Any other comments?

Targeted tests in tests/test_format_unrecognized_freq.py (issue repro, 15-min collapse, daily gap still filled, transform_data warning, load → inspect → fit). Related format/load tests passed locally.

PR checklist

For all contributions
  • I've added unit tests and made sure they pass locally (make check).
  • I've added the tool to the online documentation in docs/source/. n/a (no new tool; warning is on the existing format path)
  • I've updated the existing example scripts or provided a new one to showcase how my tool works in examples/. n/a

Unrecognized intervals were reindexed to D and
forward-filled. Bi-weekly series grew from 8 to 99
rows; 15-minute series with one gap collapsed to 1.

Fixes sktime#313
@Shashankss1205

Copy link
Copy Markdown
Collaborator

Verified on current main: the bi-weekly repro still inflates 8 rows to 99 with frequency_set true; with this branch it stays at 8 rows and transform_data surfaces the frequency_warning. Full suite green, ruff clean. Supersedes #314. The anchor-mismatch variant for recognised frequencies (audit F-01) is tracked separately.

Shashankss1205 added a commit that referenced this pull request Sep 6, 2026
Squash-merged from #553 by @Saswatsusmoy.

Co-authored-by: Saswatsusmoy <Saswatsusmoy@users.noreply.github.com>
@Shashankss1205

Copy link
Copy Markdown
Collaborator

Landed on main as fa14075 (squash-merged locally because the org policy rejects the merge API for this token). Thanks!

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.

[BUG] format_data_handle silently reindexes data to daily frequency for unrecognized time intervals

2 participants