Skip to content

fix: validate params_list length matches components in instantiate_pi…#169

Open
areychana wants to merge 1 commit intosktime:mainfrom
areychana:fix/instantiate-pipeline-params-list-length
Open

fix: validate params_list length matches components in instantiate_pi…#169
areychana wants to merge 1 commit intosktime:mainfrom
areychana:fix/instantiate-pipeline-params-list-length

Conversation

@areychana
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

fixes #168

What does this implement/fix? Explain your changes.

instantiate_pipeline was silently accepting a params_list longer than components the extra param dicts got validated with comp_name=None and passed to the executor without any error.

So i added a length check in src/sktime_mcp/tools/instantiate.py before the validation loop so that mismatched lengths return a clear error message instead of passing through silently.

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

no.

What should a reviewer concentrate their feedback on?

  • The length check added in instantiate.py around line 195
  • The error message format that is consistent with existing error messages in the same file

Any other comments?

This bug was originally flagged in issue #35. Raising a dedicated fix since it's a clear
validation gap, invalid input was passing through silently to the executor.

PR checklist

  • I've added unit tests and made sure they pass locally.

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] instantiate_pipeline silently accepts params_list longer than components

1 participant