-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Added: abs: tensorflow_frontend #10686
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Just the few comments, there are some lint errors, can you please follow the guide for adding a pre-commit hook which can fix them for you.
@to_ivy_arrays_and_back | ||
def nextafter(x1, x2, name=None): | ||
return ivy.nextafter(x1, x2) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the duplicate nextafter
on_device=on_device, | ||
rtol=1e-02, | ||
x=x[0], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end new line at EOF
@handle_frontend_test( | ||
fn_tree="tensorflow.math.abs", | ||
dtype_and_x=helpers.dtype_and_values( | ||
available_dtypes=helpers.get_dtypes("float"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this "numeric"
Made the required changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes, just one last thing and you're golden
@@ -425,6 +425,10 @@ def nextafter(x1, x2, name=None): | |||
return ivy.nextafter(x1, x2) | |||
|
|||
|
|||
def abs(x, name=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add the unit dtypes as unsupported dtypes.
Added unsupported dtypes as requested |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still have some unsupported dtypes to add, also please commit using the pre-commit hook as described here: https://lets-unify.ai/ivy/contributing/setting_up.html#pre-commit
This is to avoid formatting errors
@with_unsupported_dtypes( | ||
{"1.2.0": ("float16", "complex64", "complex128"), "1.8.0 and below": ("float16")}, | ||
"tensorflow", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include the uints as unsupported from 2.9.0 and below in order to pass the test (i.e. uint8
, uint16
, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit was passed through the pre-commit hook
Passed the latest commit through the pre-commit hook and added the missing dtypes |
LGTM, thanks for your contribution again! |
Co-authored-by: Fotios Spyridakos <[email protected]>
Co-authored-by: Fotios Spyridakos <[email protected]>
Close #10680
Added abs in math.py with following tasks: