Declare dtype on the VideoPositionEmb.generate_embeddings stub - #15991
Declare dtype on the VideoPositionEmb.generate_embeddings stub#15991Anai-Guo wants to merge 1 commit into
Conversation
VideoPositionEmb.forward calls self.generate_embeddings(..., dtype=dtype), but the abstract stub it sits next to does not accept dtype. Both subclasses in the file already do, so nothing breaks today; the stub is simply out of date, and an override written to the signature it advertises raises TypeError on first forward.
|
🎉 Thank you for your contribution, we really appreciate it! 🎉 Like many open source projects, we require contributors to sign our Contributor License Agreement (CLA). A CLA makes the ownership of contributions explicit, so contributors and the project share a clear understanding of how the code can be used. By signing, you:
CLAs are standard practice across major open source projects including those under the Apache Software Foundation and the Linux Foundation. Ours is based on the Apache Software Foundation's CLA. Most importantly, it would enable us to relicense the project under a more permissive license in the future, giving the project and its community greater flexibility. ✍ To sign, please post a new comment on this PR with exactly the following text: ✍ I have read and agree to the Contributor License Agreement You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📜 Recent review details
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly identifies the main change: adding the dtype parameter to the VideoPositionEmb.generate_embeddings stub. |
| Description check | ✅ Passed | The description accurately explains the signature mismatch, the caller and subclass context, the potential error for new overrides, and the validation performed. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
- Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
- Create stacked PR
- Commit on current branch
Comment @coderabbitai help to get the list of available commands.
One line: add
dtype=Noneto theVideoPositionEmb.generate_embeddingsstub.VideoPositionEmb.forwardpassesdtypeto it:Both concrete subclasses in the file already declare
dtype(
VideoRopePosition3DEmbat:100,LearnablePosEmbAxisat:192), so nothingis broken at runtime today. The stub is the odd one out, and it is the thing a
new subclass gets written against — such an override raises
TypeError: generate_embeddings() got an unexpected keyword argument 'dtype'on its first forward pass.
Checked by loading the module before and after, then generating an override that
copies whatever signature the stub advertises:
No behaviour change for either existing subclass.
🤖 Generated with Claude Code