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

fixed the " ModuleNotFoundError" and also the refactored the test_elu for the ELU class, to show the tests now run #28162

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions ivy_tests/test_ivy/helpers/testing_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,9 @@ def handle_method(
)

if init_num_positional_args is None:
init_num_positional_args = num_positional_args(fn_name=init_tree)
init_num_positional_args = num_positional_args(
fn_name=method_tree.rpartition(".")[0]
)

possible_arguments["init_flags"] = pf.init_method_flags(
num_positional_args=init_num_positional_args,
Expand All @@ -673,10 +675,7 @@ def handle_method(
precision_mode=_get_runtime_flag_value(precision_mode),
)

if method_num_positional_args is None:
method_num_positional_args = num_positional_args_method(
method=callable_method
)
method_num_positional_args = num_positional_args_method(method=callable_method)

possible_arguments["method_flags"] = pf.method_flags(
num_positional_args=method_num_positional_args,
Expand Down
8 changes: 5 additions & 3 deletions ivy_tests/test_ivy/test_stateful/test_activations.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
small_abs_safety_factor=8,
safety_factor_scale="log",
),
method_num_positional_args=helpers.num_positional_args(fn_name="ELU._forward"),
method_num_positional_args=helpers.num_positional_args_method(
method="ELU._forward"
),
test_gradients=st.just(True),
alpha=helpers.floats(min_value=0.1, max_value=1),
)
Expand All @@ -45,8 +47,8 @@ def test_elu(
method_flags=method_flags,
init_input_dtypes=input_dtype,
method_input_dtypes=input_dtype,
init_all_as_kwargs_np={},
method_all_as_kwargs_np={"x": x[0], "alpha": alpha},
init_all_as_kwargs_np={"alpha": alpha},
method_all_as_kwargs_np={"x": x[0]},
class_name=class_name,
method_name=method_name,
rtol_=1e-2,
Expand Down
Loading