ivy icon indicating copy to clipboard operation
ivy copied to clipboard

Maximum

Open Arwa45 opened this issue 1 year ago • 3 comments

close #17840

Arwa45 avatar Jun 28 '23 06:06 Arwa45

If you are working on an open task, please edit the PR description to link to the issue you've created.

For more information, please check ToDo List Issues Guide.

Thank you :hugs:

ivy-leaves avatar Jun 28 '23 07:06 ivy-leaves

@handle_frontend_method(
    class_tree=CLASS_TREE,
    init_tree="paddle.to_tensor",
    method_name="fmax",
    dtypes_and_x=helpers.dtype_and_values(
        available_dtypes=helpers.get_dtypes("float"), num_arrays=2, shared_dtype=True
    ),
)
def test_paddle_fmax(
    dtypes_and_x,
    frontend_method_data,
    init_flags,
    method_flags,
    frontend,
    on_device,
):
    input_dtype, x = dtypes_and_x
    helpers.test_frontend_method(
        init_input_dtypes=input_dtype,
        init_all_as_kwargs_np={"data": x[0]},
        method_input_dtypes=input_dtype,
        method_all_as_kwargs_np={"y": x[1]},
        frontend_method_data=frontend_method_data,
        init_flags=init_flags,
        method_flags=method_flags,
        frontend=frontend,
        on_device=on_device,
    )


@handle_frontend_method(
    class_tree=CLASS_TREE,
    init_tree="paddle.to_tensor",
    method_name="fmin",
    dtypes_and_x=helpers.dtype_and_values(
        available_dtypes=helpers.get_dtypes("float"), num_arrays=2, shared_dtype=True
    ),
)
def test_paddle_fmin(
    dtypes_and_x,
    frontend_method_data,
    init_flags,
    method_flags,
    frontend,
    on_device,
):
    input_dtype, x = dtypes_and_x
    helpers.test_frontend_method(
        init_input_dtypes=input_dtype,
        init_all_as_kwargs_np={"data": x[0]},
        method_input_dtypes=input_dtype,
        method_all_as_kwargs_np={"y": x[1]},
        frontend_method_data=frontend_method_data,
        init_flags=init_flags,
        method_flags=method_flags,
        frontend=frontend,
        on_device=on_device,
    )


@handle_frontend_method(
    class_tree=CLASS_TREE,
    init_tree="paddle.to_tensor",
    method_name="minimum",
    dtype_and_x=helpers.dtype_and_values(
        available_dtypes=helpers.get_dtypes("float"),
        num_arrays=2,
        shared_dtype=True,
    ),
)
def test_paddle_minimum(
    dtype_and_x,
    frontend_method_data,
    init_flags,
    method_flags,
    frontend,
    on_device,
):
    input_dtype, x = dtype_and_x
    helpers.test_frontend_method(
        init_input_dtypes=input_dtype,
        init_all_as_kwargs_np={"data": x[0]},
        method_input_dtypes=input_dtype,
        method_all_as_kwargs_np={"y": x[1]},
        frontend_method_data=frontend_method_data,
        init_flags=init_flags,
        method_flags=method_flags,
        frontend=frontend,
        on_device=on_device,
    )

Add this code below your test function in test file to resolve conflict.

HaiderSultanArc avatar Jun 28 '23 12:06 HaiderSultanArc

Hey @Arwa45, can you merge your branch with ivy master. Seems like the tests you added are not picked up by the CI. Thanks :slightly_smiling_face:

bipinKrishnan avatar Jun 29 '23 12:06 bipinKrishnan

Hey @Arwa45, can you merge your branch with ivy master. Seems like the tests you added are not picked up by the CI. Thanks 🙂

hey @bipinKrishnan Do you want to merge ivy's branch with mine? and why CI didn't pick the tests. It's on GitHub I can see that tests ran

Arwa45 avatar Jul 02 '23 16:07 Arwa45

Hi @Arwa45 , the tests ran but it did not pick the test you added test_paddle_maximum. Thanks :slightly_smiling_face:

bipinKrishnan avatar Jul 04 '23 11:07 bipinKrishnan

Hey @Arwa45, can you merge your branch with ivy master. Seems like the tests you added are not picked up by the CI. Thanks 🙂

Hi @bipinKrishnan , How can @Arwa45 merge her branch with Ivy's master branch. Applicants don't get that kind of access. Reviewers have to merge the branch into Ivy's master branch.

HaiderSultanArc avatar Jul 04 '23 12:07 HaiderSultanArc

I meant to to merge ivy master onto their branch. Sorry for the confusion there :slightly_smiling_face: . Also @Arwa45, please update the master in your fork with the ivy upstream branch. Not sure what happened, but resolving some merge conflicts added a lot of changes that is not related to your PR. Let's see if updating your master solves the issue, otherwise we could revert the conflict resolving commit.

Update: I've just reverted the change

bipinKrishnan avatar Jul 04 '23 12:07 bipinKrishnan

Hey @Arwa45 , can you fix the failing tests for your changes. Thanks.

bipinKrishnan avatar Jul 06 '23 11:07 bipinKrishnan

The tests are still failing due to some unexpected argument issue, fixing this should allow us to run the tests and see if the implementation is correct @Arwa45

bipinKrishnan avatar Jul 11 '23 11:07 bipinKrishnan