Skip to content

FIX methodcaller kwarg support - #551

Merged
adrinjalali merged 5 commits into
skops-dev:mainfrom
adrinjalali:methodcaller-kwargs
Sep 27, 2026
Merged

adrinjalali merged 5 commits into
skops-dev:mainfrom
adrinjalali:methodcaller-kwargs

Conversation

@adrinjalali

Copy link
Copy Markdown
Member

methodcaller should support kwarg, and this PR does that. However, it requires a protocol bump.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation correctly preserves kwargs, maintains backward compatibility, and includes focused regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Adds keyword-argument persistence for operator.methodcaller while preserving protocol-2 compatibility.

Changes:

  • Serializes and reconstructs operator keyword arguments.
  • Bumps the persistence protocol to 3 and registers the protocol-2 loader.
  • Adds round-trip and backward-compatibility tests.
File Description
skops/​io/​_general.py Persists and loads operator kwargs.
skops/​io/​_protocol.py Bumps protocol to 3.
skops/​io/​_persist.py Registers the protocol-2 loader.
skops/​io/​old/​_general_v2.py Preserves protocol-2 operator loading.
skops/​io/​tests/​test_persist.py Tests methodcaller round trips.
skops/​io/​tests/​test_persist_old.py Tests protocol-2 compatibility.
docs/​changes.rst Documents the fix and protocol bump.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@adrinjalali
adrinjalali merged commit a965a02 into skops-dev:main Sep 27, 2026
30 checks passed
@adrinjalali
adrinjalali deleted the methodcaller-kwargs branch September 27, 2026 09:40
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.

2 participants