Skip to content

fix: correct positional_encoding_size type from bool to int#524

Merged
Borda merged 3 commits intoroboflow:developfrom
lixiaolei1982:fix/positional-encoding-type-annotation
Feb 18, 2026
Merged

fix: correct positional_encoding_size type from bool to int#524
Borda merged 3 commits intoroboflow:developfrom
lixiaolei1982:fix/positional-encoding-type-annotation

Conversation

@lixiaolei1982
Copy link
Copy Markdown
Contributor

Description

Fixed incorrect type annotation for positional_encoding_size parameter in Backbone.__init__ method.

Changes Made

  • Changed type from bool = False to int = 37
  • Matches the expected type in DinoV2 class
  • Improves type safety and developer experience

Testing

  • All existing tests pass
  • Type checkers now validate correctly
  • Backward compatible

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an incorrect type annotation for the positional_encoding_size parameter in the Backbone.__init__ method, changing it from bool = False to int = 37 to match the expected type in the DinoV2 class where it's used in arithmetic operations.

Changes:

  • Corrected type annotation from bool to int for positional_encoding_size parameter
  • Updated default value from False to 37

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rfdetr/models/backbone/backbone.py Outdated
@Borda Borda added the bug Something isn't working label Jan 22, 2026
@Borda Borda requested a review from isaacrob as a code owner February 11, 2026 15:57
@Borda Borda force-pushed the develop branch 4 times, most recently from 60b16c1 to 523f9df Compare February 14, 2026 06:46
Borda and others added 2 commits February 18, 2026 23:29
@Borda Borda self-requested a review as a code owner February 18, 2026 22:29
@Borda Borda merged commit 0cc4266 into roboflow:develop Feb 18, 2026
21 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60%. Comparing base (68a9a8c) to head (97140bb).
⚠️ Report is 7 commits behind head on develop.

Additional details and impacted files
@@          Coverage Diff           @@
##           develop   #524   +/-   ##
======================================
  Coverage       60%    60%           
======================================
  Files           55     55           
  Lines         6993   7005   +12     
======================================
+ Hits          4202   4224   +22     
+ Misses        2791   2781   -10     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Borda added a commit that referenced this pull request Mar 13, 2026
* fix: correct positional_encoding_size type from bool to int

---------

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants