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: fixed the failing test case at paddle backend #27831

Merged
merged 9 commits into from
Jan 31, 2024

Conversation

samthakur587
Copy link
Contributor

@samthakur587 samthakur587 commented Jan 2, 2024

fixed the test case failing at paddle backend in ivy.equal

tested in local all tests are passing except paddle but paddle it self have this bug ivy don't have any problem. i have raised a bug on paddle you can see here. here

here the test result .

image

# TODO enable
        # if ivy.is_ivy_container(ret_np) and ivy.is_ivy_container(ret_from_gt_np):
        #     ivy.Container.cont_multi_map(assert_all_close, [ret_np, ret_from_gt_np])
        # else:
        if ret_np.dtype == "bfloat16" or ret_from_gt_np.dtype == "bfloat16":
            ret_np = ret_np.astype("float64")
            ret_from_gt_np = ret_from_gt_np.astype("float64")
>       assert np.allclose(
            np.nan_to_num(ret_np), np.nan_to_num(ret_from_gt_np), rtol=rtol, atol=atol
        ), (
            f" the results from backend {backend} "
            f"and ground truth framework {ground_truth_backend} "
            f"do not match\n {ret_np}!={ret_from_gt_np} \n\n"
        )
E       AssertionError:  the results from backend paddle and ground truth framework tensorflow do not match
E        True!=False 
E       
E       
E       Falsifying example: test_equal(
E           backend_fw='paddle',
E           on_device='cpu',
E           dtype_and_x=(['float32', 'float32'],
E            [array(-7.450581e-09, dtype=float32),
E             array(-1.1175871e-08, dtype=float32)]),
E           test_flags=FunctionTestFlags(
E               ground_truth_backend='tensorflow',
E               num_positional_args=2,
E               with_out=False,
E               with_copy=False,
E               instance_method=False,
E               test_gradients=False,
E               test_trace=False,
E               transpile=False,
E               as_variable=[False],
E               native_arrays=[False],
E               container=[False],
E               precision_mode=False,
E           ),  # or any other generated value
E           fn_name='equal',
E       )
E       Explanation:
E           These lines were always and only run by failing examples:
E               /home/samthakur/ubuntu_files/ivy/ivy_tests/test_ivy/helpers/assertions.py:58

Closes #27830

Checklist

  • Did you add a function?
  • Did you add the tests?
  • Did you run your tests and are your tests passing?
  • Did pre-commit not fail on any check?
  • Did you follow the steps we provided?

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

PR Compliance Checks Passed!

@samthakur587
Copy link
Contributor Author

image

passing all the tests now

@samthakur587 samthakur587 self-assigned this Jan 31, 2024
@samthakur587 samthakur587 merged commit a706f8f into ivy-llc:main Jan 31, 2024
55 of 141 checks passed
@samthakur587 samthakur587 deleted the fix_equel branch February 3, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Ivy Failing Test: paddle - elementwise.equal
3 participants