Skip to content

test: add horizon validation tests for fit_predict_tool and fit_predict_async_tool#368

Open
rupeshca007 wants to merge 1 commit into
sktime:mainfrom
rupeshca007:fix/horizon-validation
Open

test: add horizon validation tests for fit_predict_tool and fit_predict_async_tool#368
rupeshca007 wants to merge 1 commit into
sktime:mainfrom
rupeshca007:fix/horizon-validation

Conversation

@rupeshca007

@rupeshca007 rupeshca007 commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #367

What this adds

test_param_validation.py currently only tests horizon validation for predict_tool. This PR adds the missing parametrized test classes for fit_predict_tool and fit_predict_async_tool, ensuring the _validate_horizon guard is explicitly covered for all three functions.

Changes

  • tests/test_param_validation.py:
    • Added TestFitPredictToolHorizonValidation with 6 parametrized cases
    • Added TestFitPredictAsyncToolHorizonValidation with 6 parametrized cases
    • Updated imports to include fit_predict_tool and fit_predict_async_tool
      Each test class covers:
  • horizon=0 -> rejected ("greater than 0")
    • horizon=-1 -> rejected ("greater than 0")
    • horizon=-100 -> rejected ("greater than 0")
    • horizon="twelve" -> rejected ("must be an integer")
    • horizon=3.5 -> rejected ("must be an integer")
    • horizon=None -> rejected ("must be an integer")

Test Results

34 passed, 0 failed

@rupeshca007 rupeshca007 changed the title test: add horizon validation tests for fit_predict_tool and fit_predict_async_tool feat: add compare_estimators_tool for agentic model selection Apr 29, 2026
@rupeshca007
rupeshca007 force-pushed the fix/horizon-validation branch from c93406f to 4d4e24f Compare April 29, 2026 09:19
@rupeshca007
rupeshca007 force-pushed the fix/horizon-validation branch from 4d4e24f to bde5927 Compare April 29, 2026 09:28
@rupeshca007 rupeshca007 changed the title feat: add compare_estimators_tool for agentic model selection test: add horizon validation tests for fit_predict_tool and fit_predict_async_tool Apr 29, 2026
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] horizon parameter not validated in predict_tool, fit_predict_tool, and fit_predict_async_tool — invalid values cause silent failures

1 participant