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

Fix MapCoordinates class and Add Tests for Uncovered Areas in keras/ops/image.py #19507

Merged

Conversation

Faisal-Alsrheed
Copy link
Contributor

@Faisal-Alsrheed Faisal-Alsrheed commented Apr 14, 2024

This PR addresses a

TypeError: MapCoordinates.__init__() missing 1 required positional argument: 'order'

in MapCoordinates by adding a default order=1 in the constructor.

Also,
tests for uncovered areas in ops/image.py are also included for better coverage.


Note:

We default to order=1 for linear interpolation, which is generally more commonly used in many applications and preferred choice due to its smoother results than order=0 (nearest neighbor).


Changes Made:

  • Added default order=1 to MapCoordinates constructor.
  • Included tests for uncovered areas in ops/image.py.

@codecov-commenter
Copy link

codecov-commenter commented Apr 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.31%. Comparing base (b267f93) to head (c35b1ea).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19507      +/-   ##
==========================================
+ Coverage   76.28%   76.31%   +0.03%     
==========================================
  Files         367      367              
  Lines       41233    41233              
  Branches     8076     8076              
==========================================
+ Hits        31453    31467      +14     
+ Misses       8059     8052       -7     
+ Partials     1721     1714       -7     
Flag Coverage Δ
keras 76.16% <100.00%> (+0.03%) ⬆️
keras-jax 60.34% <100.00%> (+0.03%) ⬆️
keras-numpy 54.31% <100.00%> (+0.03%) ⬆️
keras-tensorflow 61.59% <100.00%> (+0.03%) ⬆️
keras-torch 60.45% <100.00%> (+0.03%) ⬆️

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.

@Faisal-Alsrheed Faisal-Alsrheed marked this pull request as ready for review April 14, 2024 11:00
Copy link
Collaborator

@fchollet fchollet left a comment

Choose a reason for hiding this comment

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

Nice work -- LGTM!

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Apr 14, 2024
@fchollet fchollet merged commit 032cdff into keras-team:master Apr 14, 2024
18 checks passed
@google-ml-butler google-ml-butler bot removed ready to pull Ready to be merged into the codebase kokoro:force-run labels Apr 14, 2024
@Faisal-Alsrheed Faisal-Alsrheed deleted the add-tests-keras-ops-image branch April 26, 2024 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants