Skip to content

[BUG] auto_format_on_load crashes internally for valid RangeIndex time series #390

Description

@biru-codeastromer

Summary

When load_data_source receives valid integer-indexed pandas data with auto-format enabled, the request succeeds but the auto-format step logs an internal failure:

Auto-formatting failed: 'RangeIndex' object has no attribute 'freq'\n```\n\n## Reproduction\n```python\nfrom sktime_mcp.runtime.executor import Executor\n\nExecutor().load_data_source({\n    "type": "pandas",\n    "data": {"y": [1, 2, 3, 4]},\n})\n```\n\n## Current behavior\n- returns `success=True`\n- auto-formatting falls back after logging an internal failure\n- valid integer-indexed time series do not go through the normal formatting path\n\n## Expected behavior\n- integer / `RangeIndex` inputs should be treated as valid forecasting data\n- auto-formatting should skip datetime-only frequency inference for non-datetime indexes\n- metadata should preserve a sensible frequency label such as `Integer` instead of degrading or failing\n\n## Why this matters\nThe adapters and validation layer already allow integer-style indexes. The formatter should not assume datetime-only frequency metadata, otherwise a valid workflow partially fails behind the scenes and becomes harder for MCP clients to trust.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions