Skip to content

fix: stop double-passing engine kwarg in _bind_engine patch - #19

Open
robotlearning123 wants to merge 1 commit into
masterfrom
fix/issue-17-engine-kwarg-crash
Open

robotlearning123 wants to merge 1 commit into
masterfrom
fix/issue-17-engine-kwarg-crash

Conversation

@robotlearning123

Copy link
Copy Markdown
Contributor

Summary

  • _bind_engine wrapped backend.generate with a lambda that injected engine=... while also forwarding the caller's **kw; core/pipeline.py:90 already calls generate(req, engine=self.engine), so every h3 run raised TypeError: generate() got multiple values for keyword argument 'engine'.
  • The wrapper now drops any caller-supplied engine kwarg before injecting the bound one — the CLI-configured engine (--server) is authoritative, matching the binding's documented intent.
  • Adds tests/test_bind_engine.py: drives the real H3Backend.generate through the patched path with a recording engine double; asserts no TypeError and that the bound engine object (identity) is the one that ran.

Test plan

  • pytest tests/test_bind_engine.py — red on main (TypeError reproduced), green on this branch
  • pytest tests/ — 61 passed

Fixes #17

The generate() wrapper injected engine=... while also forwarding the
caller's kwargs; pipeline.py already passes engine=self.engine, so every
h3 run died with TypeError: got multiple values for keyword argument
'engine'. Drop any caller-supplied engine kwarg before injecting — the
bound (CLI-configured) engine is authoritative.

Fixes #17
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.

fix: open-video run crashes 100% — engine kwarg double-passed by _bind_engine patch

2 participants