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

L1 normalization added. #14717

Merged
merged 7 commits into from
May 25, 2023
Merged

L1 normalization added. #14717

merged 7 commits into from
May 25, 2023

Conversation

Suraj520
Copy link
Contributor

@Suraj520 Suraj520 commented Apr 29, 2023

Added L1 normalization and migrated it to experimental.
Closes #15824

@ivy-leaves ivy-leaves added Ivy Functional API Ivy API Experimental Run CI for testing API experimental/New feature or request labels Apr 29, 2023
@zaeemansari70
Copy link
Contributor

Hi @Suraj520,
I've seen you are still implementing the function in the PR,
kindly do request a review by commenting on the PR once you are done! 🙂

@Suraj520
Copy link
Contributor Author

Suraj520 commented May 2, 2023

Hi @Suraj520, I've seen you are still implementing the function in the PR, kindly do request a review by commenting on the PR once you are done! slightly_smiling_face

Hi @zaeemansari70 : I'm not implementing anything as of now. Can you please review 😃

Copy link
Contributor

@zaeemansari70 zaeemansari70 left a comment

Choose a reason for hiding this comment

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

@Suraj520 , as this is a fundamental function this has to be a primary implementation which means it has to be implemented in all the backends separately, also you have to add the tests for the function as well, I'd suggest you to see the docs for this. https://lets-unify.ai/docs/ivy/overview/deep_dive/function_types.html
One more thing, your PR also not linked to an issue, kindly link the PR to the issue as well 🙂
Thanks! 🙂

@Suraj520
Copy link
Contributor Author

Suraj520 commented May 2, 2023

@Suraj520 , as this is a fundamental function this has to be a primary implementation which means it has to be implemented in all the backends separately, also you have to add the tests for the function as well, I'd suggest you to see the docs for this. https://lets-unify.ai/docs/ivy/overview/deep_dive/function_types.html One more thing, your PR also not linked to an issue, kindly link the PR to the issue as well slightly_smiling_face Thanks! slightly_smiling_face 😄

Sure, I will check the deep-dive again. I'll try to update you on this by weekend.

@Suraj520
Copy link
Contributor Author

Suraj520 commented May 6, 2023

@zaeemansari70 - I have implemented L1 normalization across all backends, Migrated it to experimental and written the unit tests. Kindly review 😄

Copy link
Contributor

@zaeemansari70 zaeemansari70 left a comment

Choose a reason for hiding this comment

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

Awesome @Suraj520 !

I've requested some more changes 🙂

  1. As this is a backend implementation, you should also add the array and container instance methods, kindly add those.
  2. Please resolve the merge conflicts too 🙂

Thanks! 🙂

@Suraj520
Copy link
Contributor Author

Awesome @Suraj520 !

I've requested some more changes slightly_smiling_face

  1. As this is a backend implementation, you should also add the array and container instance methods, kindly add those.
  2. Please resolve the merge conflicts too slightly_smiling_face

Thanks! slightly_smiling_face

Hey @zaeemansari70

I've resolved the merge conflicts but I am not sure how and where to add the array and container instance methods. Can you please elaborate upon how and where it should be implemented with a reference example ?

Thanks !

Copy link
Contributor

@zaeemansari70 zaeemansari70 left a comment

Choose a reason for hiding this comment

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

Hi @Suraj520 ,
So there is a folder known as data_classes inside ivy, the path is ivy/data_classes
You will see the array and container folders there, you have to add these in the experimental folder for the respective files, you'll get an idea how to add them by looking at other implementations.
It's fairly simple 🙂

@Suraj520
Copy link
Contributor Author

Hi @Suraj520 , So there is a folder known as data_classes inside ivy, the path is ivy/data_classes You will see the array and container folders there, you have to add these in the experimental folder for the respective files, you'll get an idea how to add them by looking at other implementations. It's fairly simple slightly_smiling_face

@zaeemansari70 : Done ! Please review 😄

Copy link
Contributor

@zaeemansari70 zaeemansari70 left a comment

Choose a reason for hiding this comment

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

lgtm!
Thanks for contributing to Ivy! 🙂

@zaeemansari70 zaeemansari70 linked an issue May 24, 2023 that may be closed by this pull request
@zaeemansari70
Copy link
Contributor

zaeemansari70 commented May 24, 2023

@Suraj520
I am manually linking your PR to an issue, kindly do not forget to do this in the future.

Copy link
Contributor

@zaeemansari70 zaeemansari70 left a comment

Choose a reason for hiding this comment

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

One last change 🙂


# local
import ivy_tests.test_ivy.helpers as helpers
from ivy_tests.test_ivy.helpers import handle_test

@handle_test(
fn_tree="functional.ivy.l1_normalize",
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I missed this, this should be called from experimental Ivy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out ! Fixed it 😄 ! Kindly check

@Suraj520
Copy link
Contributor Author

lgtm

@Suraj520 I am manually linking your PR to an issue, kindly do not forget to do this in the future.

Sure ! Noted 😊

Copy link
Contributor

@zaeemansari70 zaeemansari70 left a comment

Choose a reason for hiding this comment

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

As the tests are also passing, the changes lgtm! 👍

@zaeemansari70 zaeemansari70 merged commit 22cce08 into ivy-llc:master May 25, 2023
@Suraj520
Copy link
Contributor Author

As the tests are also passing, the changes lgtm! +1

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ivy API Experimental Run CI for testing API experimental/New feature or request Ivy Functional API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

L1_normalize
4 participants