From 643d888b41e28f5aa01114dc7eb9bd3984a3cc09 Mon Sep 17 00:00:00 2001 From: Ved Patwardhan <54766411+VedPatwardhan@users.noreply.github.com> Date: Tue, 25 Oct 2022 12:48:15 +0530 Subject: [PATCH] Minor changes to the helpers to enable gradient testing (#6137) --- ivy_tests/test_ivy/helpers/function_testing.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ivy_tests/test_ivy/helpers/function_testing.py b/ivy_tests/test_ivy/helpers/function_testing.py index 9375cc0a2d64b..bd53640024e92 100644 --- a/ivy_tests/test_ivy/helpers/function_testing.py +++ b/ivy_tests/test_ivy/helpers/function_testing.py @@ -357,12 +357,7 @@ def test_function( raise e ivy.unset_backend() # gradient test - if ( - test_gradients - and not fw == "numpy" - and all(as_variable_flags) - and not instance_method - ): + if test_gradients and not fw == "numpy" and not instance_method: gradient_test( fn_name=fn_name, all_as_kwargs_np=all_as_kwargs_np, @@ -851,9 +846,6 @@ def grad_fn(xs): len(grads_np_from_gt_flat), ) - if len(grads_np_flat) < 2: - return - for grad_np_flat, grad_np_from_gt_flat in zip(grads_np_flat, grads_np_from_gt_flat): value_test( ret_np_flat=grad_np_flat,