ivy icon indicating copy to clipboard operation
ivy copied to clipboard

updated _compute_cost_and_update_grads function to specifications (Close #756)

Open rereversed opened this issue 1 year ago • 5 comments

  • followed the 4 steps including referring back to the deep dive page
  • replaced lambda with a nested function 'cost_fn_with_variables' (parameter v)inside the main function
  • added doctoring with example based off the sections provided in deep dive.

not sure if I should have put any decorators, also this is my first time using GitHub, the whole repo is so intuitive!

rereversed avatar Jun 28 '23 16:06 rereversed

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 16:06 ivy-leaves

Hey @rereversed 🙂, thanks for contributing! But could you edit the description with Close #Issue_number, as explained here so everything's properly linked and we know what's being changed and for what purpose.

aparajith21 avatar Jun 29 '23 06:06 aparajith21

Hey @rereversed 🙂, thanks for contributing! But could you edit the description with Close #Issue_number, as explained here so everything's properly linked and we know what's being changed and for what purpose.

Thanks for reminding me, totally missed it ! What should I do now?

rereversed avatar Jun 29 '23 09:06 rereversed

open #18004

rereversed avatar Jun 29 '23 16:06 rereversed

Close #18275

rereversed avatar Jul 04 '23 10:07 rereversed

Reformatting Task Checklist

IMPORTANT NOTICE 🚨:

The Ivy Docs represent the ground truth for the task descriptions and this checklist should only be used as a supplementary item to aid with the review process.

LEGEND 🗺:

  • ❌ : Check item is not completed.
  • ✅ : Check item is ready for review.
  • 🆘 : Stuck/Doubting implementation (PR author should add comments explaining why).
  • ⏩ : Check is not applicable to function (skip).
  • 🆗 : Check item is already implemented and does not require any edits.

CHECKS 📑:

    • [ ]✅: Make sure that the aforementioned methods are added into the correct category-specific parent class, such as ivy.ArrayWithElementwise, ivy.ContainerWithManipulation etc.
    • [ ] ✅ : Add the correct Docstrings to every function and its relevant methods, including those you did not implement yourself. The following should be added:
        • [ ] ✅ : The function's Array API standard description in ivy/functional/meta.py. If the function is not part of the Array API standard then a description of similar style should be added to the same file. The following modifications should be made to the description:
          • [ ] ✅ : Remove type definitions in the Parameters and Returns sections.
          • [ ] ✅ : Add out to the Parameters section if function accepts an out argument.
          • [ ] ✅ : Replace out with ret in the Returns section.
        • [ ] ✅ : Reference to docstring for ivy.function_name (5.a) for the function description and modified Parameters and Returns sections as described in the docs in:
    • [ ] ✅ : Add thorough Docstring Examples for every function and its relevant methods and ensure they pass the docstring tests.

      Functional Examples in ivy/functional/meta.py.

        • [ ] ✅ : Cover all possible variants for each of the arguments independently (not combinatorily).
        • [ ] ✅ : Vary the values and input shapes considerably between examples.
        • [ ] ✅ : Start out simple and get more complex with each example.
        • [ ] ✅ : Show an example with:
          • [ ] ✅ : out unused.
          • [ ] ✅ : out used to update a new array y.
          • [ ] ✅ : out used to inplace update the input array x (if x has the same dtype and shape as the return).
        • [ ] ⏩: If broadcasting is relevant for the function, then show examples which highlight this.

      Nestable Function Examples in ivy/functional/meta.py. Only if the function supports nestable operations.

        • [ ] ✅: Add an example that passes in an ivy.Container instance in place of one of the arguments.
        • [ ] ✅: Add an example passes in ivy.Container instances for multiple arguments.

      Container Static Method Examples in ivy/container/meta.py.

        • [ ] ✅: The example from point (6.f) should be replicated, but added to the ivy.Container static method docstring in with ivy.<func_name> replaced with ivy.Container.static_<func_name> in the example.
        • [ ] ✅: The example from point (6.g) should be replicated, but added to the ivy.Container static method docstring, with ivy.<func_name> replaced with ivy.Container.static_<func_name> in the example.

      Array Instance Method Example in ivy/array/meta.py.

        • [ ] ✅: Call this instance method of the ivy.Array class.

      Container Instance Method Example in ivy/container/meta.py.

        • [ ] ✅: Call this instance method of the ivy.Container class.

      Array Operator Examples in ivy/array/array.py.

        • [ ] ✅: Call the operator on two ivy.Array instances.
        • [ ] ✅: Call the operator with an ivy.Array instance on the left and ivy.Container on the right.

      Array Reverse Operator Example in ivy/array/array.py.

        • [ ] ✅: Call the operator with a Number on the left and an ivy.Array instance on the right.

      Container Operator Examples in ivy/container/container.py.

        • [ ] ✅: Call the operator on two ivy.Container instances containing Number instances at the leaves.
        • [ ] ✅: Call the operator on two ivy.Container instances containing ivy.Array instances at the leaves.
        • [ ] ✅: Call the operator with an ivy.Container instance on the left and ivy.Array on the right.

      Container Reverse Operator Example in ivy/container/container.py.

        • [ ] ✅: Following example in the ivy.Container.__radd__ docstring, with the operator called with a Number on the left and an ivy.Container instance on the right.

      Tests

        • [ ]✅: Docstring examples tests passing.
        • [ ] 🆘: Lint checks passing.

rereversed avatar Jul 04 '23 11:07 rereversed

This PR has been labelled as stale because it has been inactive for more than 7 days. If you would like to continue working on this PR, then please add another comment or this PR will be closed in 7 days.

ivy-seed avatar Jul 15 '23 05:07 ivy-seed

This PR has been closed because it has been marked as stale for more than 7 days with no activity.

ivy-seed avatar Jul 24 '23 05:07 ivy-seed