ivy icon indicating copy to clipboard operation
ivy copied to clipboard

feat: added numpy gradient function and its test

Open alvin-98 opened this issue 1 year ago • 1 comments

PR Description

Added numpy gradient frontend function and its test

Related Issue

Closes #27737

Checklist

  • [x] Did you add a function?
  • [x] Did you add the tests?
  • [ ] Did you run your tests and are your tests passing?
  • [x] Did pre-commit not fail on any check?
  • [x] Did you follow the steps we provided?

The code is failing for paddle alone and for examples involving nan in the output. I'm working on trying to fix it but any help would be great! Thanks :) image

This is the failure message from hypothesis - image

image

Socials

alvin-98 avatar Dec 20 '23 08:12 alvin-98

Try to run the test of the function ivy.gradient and check if the the paddle test fails for that parent function. @alvin-98

MuhammadNizamani avatar Dec 21 '23 11:12 MuhammadNizamani

Hi @alvin-98, do you have any update on this PR, let me know if you need any help.

NiteshK84 avatar Dec 28 '23 07:12 NiteshK84

Hi @NiteshK84, I ran the test of the function ivy.gradient as per @MuhammadNizamani's suggestion above and found that all of its tests were failing, however, only the paddle test was failing in the case of test_numpy_gradient function.

alvin-98 avatar Dec 28 '23 08:12 alvin-98

Try to run the test of the function ivy.gradient and check if the the paddle test fails for that parent function. @alvin-98

Hi @alvin-98, i have reviewed your PR, there is some problem with the ivy.gradient core function itself, so until that is resolved, you can pick another issue and start working on it.

NiteshK84 avatar Jan 03 '24 17:01 NiteshK84

Hi @alvin-98, I looked in to this issue a little more and got to know that you can use ivy.execute_with_gradients instead of ivy.gradient, it might work. once done, you can let me know. Thanks

NiteshK84 avatar Jan 04 '24 08:01 NiteshK84

Closing this due to inactivity for nearly 3 months. Please feel free to reopen if you would like to continue working on this. Thanks for the efforts :)

Ishticode avatar Apr 02 '24 10:04 Ishticode