Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests/style] Fix tf test and formatting #1762

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

felixdittrich92
Copy link
Contributor

This PR:

  • Fix failing TF test
  • Formatting

@felixdittrich92 felixdittrich92 added ext: tests Related to tests folder framework: tensorflow Related to TensorFlow backend type: misc Miscellaneous type: code quality Related to code quality labels Oct 25, 2024
@felixdittrich92 felixdittrich92 added this to the 0.11.0 milestone Oct 25, 2024
@felixdittrich92 felixdittrich92 self-assigned this Oct 25, 2024
@@ -140,7 +140,7 @@ def rotate_sample(
rotated_geoms[..., 0] = rotated_geoms[..., 0] / rotated_img.shape[1]
rotated_geoms[..., 1] = rotated_geoms[..., 1] / rotated_img.shape[0]

return rotated_img, np.clip(rotated_geoms, 0, 1)
return rotated_img, np.clip(np.around(rotated_geoms, decimals=15), 0, 1)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@odulcy-mindee I added this already to the pytorch implementation (

return rotated_img, np.clip(np.around(rotated_geoms, decimals=15), 0, 1)
) but missed to add it to TF side 😅

Now with TF 2.18 it installs with numpy 2.0 (before <2.0 with 2.0 compatibility) and that's the reason why the test was failing

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.55%. Comparing base (57d1fe5) to head (adb2dea).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
doctr/utils/data.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1762      +/-   ##
==========================================
- Coverage   96.56%   96.55%   -0.02%     
==========================================
  Files         164      164              
  Lines        7895     7895              
==========================================
- Hits         7624     7623       -1     
- Misses        271      272       +1     
Flag Coverage Δ
unittests 96.55% <87.50%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@felixdittrich92 felixdittrich92 merged commit d0eff67 into mindee:main Oct 25, 2024
80 of 82 checks passed
@felixdittrich92 felixdittrich92 deleted the tf-test-fix branch October 25, 2024 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext: tests Related to tests folder framework: tensorflow Related to TensorFlow backend type: code quality Related to code quality type: misc Miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants