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

Implemented min in paddle.tensor #17680

Merged
merged 3 commits into from
Jul 12, 2023
Merged

Implemented min in paddle.tensor #17680

merged 3 commits into from
Jul 12, 2023

Conversation

Law47
Copy link
Contributor

@Law47 Law47 commented Jun 24, 2023

Fixes #17679

@ivy-leaves ivy-leaves added the Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist label Jun 24, 2023
Copy link
Contributor

@sherry30 sherry30 left a comment

Choose a reason for hiding this comment

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

Hi,
Can you remove the changes from the .idea files.
Also you have to add a test for the function that you've added. You can go through our docs here to get an idea how you would do that.

Thanks

@Law47 Law47 closed this Jun 27, 2023
@Law47 Law47 force-pushed the master branch 2 times, most recently from 5e8c40f to d386d83 Compare June 27, 2023 19:56
@Law47 Law47 reopened this Jun 27, 2023
Copy link
Contributor

@sherry30 sherry30 left a comment

Choose a reason for hiding this comment

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

Hi,

The changes in the .idea folder are still there. Can you remove those.
I think you've added the min function twice by accident, can you remove one implementation.'

Thanks

@Law47 Law47 closed this Jun 29, 2023
@Law47 Law47 force-pushed the master branch 2 times, most recently from 7b750cd to 4e8f544 Compare June 29, 2023 07:02
@Law47 Law47 reopened this Jun 29, 2023
Copy link
Contributor

@sherry30 sherry30 left a comment

Choose a reason for hiding this comment

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

minor changes,
other than that works fine

Thanks

init_tree="paddle.to_tensor",
method_name="min",
dtype_x_axis=helpers.dtype_values_axis(
available_dtypes=st.one_of(helpers.get_dtypes("float", "integer")),
Copy link
Contributor

Choose a reason for hiding this comment

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

You can add helpers.get_dtypes("numeric") instead

@@ -355,3 +355,10 @@ def max(self, axis=None, keepdim=False, name=None):
@with_unsupported_dtypes({"2.5.0 and below": ("float16", "bfloat16")}, "paddle")
def deg2rad(self, name=None):
return ivy.deg2rad(self._ivy_array)

@with_supported_dtypes(
{"2.5.0 and below": ("float16", "float32", "float64", "int32", "int64")},
Copy link
Contributor

Choose a reason for hiding this comment

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

float16 is not supported for this

"paddle",
)
def min(self, axis=None, keepdim=False, name=None):
return ivy.min(self._ivy_array, axis=axis, keepdim=keepdim)
Copy link
Contributor

Choose a reason for hiding this comment

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

ivy.min takes keepdims with the "s".

@Law47 Law47 closed this Jul 3, 2023
@Law47 Law47 force-pushed the master branch 2 times, most recently from d6ef5dc to edb7640 Compare July 3, 2023 06:11
@Law47 Law47 reopened this Jul 3, 2023
Copy link
Contributor

@sherry30 sherry30 left a comment

Choose a reason for hiding this comment

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

minor change

{"2.5.0 and below": ("float32", "float64", "int32", "int64")},
"paddle",
)
def min(self, axis=None, keepdims=False, name=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

Its still keepdim for paddle's min function.
only ivy's function has keepdims

@Law47 Law47 closed this Jul 6, 2023
@Law47 Law47 force-pushed the master branch 2 times, most recently from 985375c to 2f1bf55 Compare July 6, 2023 23:30
@Law47 Law47 reopened this Jul 6, 2023
@sherry30
Copy link
Contributor

sherry30 commented Jul 11, 2023

ivy-gardener
✅ Ivy gardener has formatted your code.
If changes are requested, don't forget to pull your fork.

Copy link
Contributor

@sherry30 sherry30 left a comment

Choose a reason for hiding this comment

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

lgtm!

Can you resolves the conflicts, I'll merge it as soon as you do. Also feel free to ask for a review when you're done making changes. 😄

Thanks

@Law47 Law47 closed this Jul 11, 2023
@Law47 Law47 force-pushed the master branch 2 times, most recently from 42997f2 to d8389d0 Compare July 11, 2023 21:43
@Law47 Law47 reopened this Jul 11, 2023
@Law47
Copy link
Contributor Author

Law47 commented Jul 11, 2023

Hello, I have resolved the conflicts. Please review my PR.

@sherry30
Copy link
Contributor

sherry30 commented Jul 12, 2023

ivy-gardener
✅ Ivy gardener has formatted your code.
If changes are requested, don't forget to pull your fork.

@sherry30 sherry30 merged commit a6a6c70 into ivy-llc:master Jul 12, 2023
Ashwani132003 pushed a commit to Ashwani132003/ivy that referenced this pull request Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

min
4 participants