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

tolist #21303

Closed
wants to merge 11 commits into from
Closed

tolist #21303

wants to merge 11 commits into from

Conversation

Sanchay-T
Copy link

@Sanchay-T Sanchay-T commented Aug 4, 2023

close #21956

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Thanks for contributing to Ivy! 😊👏
Here are some of the important points from our Contributing Guidelines 📝:
1. Feel free to ignore the run_tests (1), run_tests (2), … jobs, and only look at the display_test_results job. 👀 It contains the following two sections:
- Combined Test Results: This shows the results of all the ivy tests that ran on the PR. ✔️
- New Failures Introduced: This lists the tests that are passing on master, but fail on the PR Fork. Please try to make sure that there are no such tests. 💪
2. The lint / Check formatting / check-formatting tests check for the formatting of your code. 📜 If it fails, please check the exact error message in the logs and fix the same. ⚠️🔧
3. Finally, the test-docstrings / run-docstring-tests check for the changes made in docstrings of the functions. This may be skipped, as well. 📚
Happy coding! 🎉👨‍💻

@Sanchay-T
Copy link
Author

#21251

@Sanchay-T Sanchay-T changed the title close #21251 Close #21251 Aug 4, 2023
@ivy-leaves ivy-leaves added the Paddle Frontend Developing the Paddle Frontend, checklist triggered by commenting add_frontend_checklist label Aug 4, 2023
@ivy-leaves
Copy link

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 🤗

@Sanchay-T
Copy link
Author

I did , is this proper?

Copy link
Contributor

@vaithak vaithak left a comment

Choose a reason for hiding this comment

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

Please remove editor specific files (.idea/*) from the PR

.gitignore Outdated Show resolved Hide resolved
@Sanchay-T
Copy link
Author

I pushed after making the changes , do I need to create another PR?

@Sanchay-T Sanchay-T requested a review from vaithak August 6, 2023 08:31
Copy link
Author

@Sanchay-T Sanchay-T left a comment

Choose a reason for hiding this comment

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

Did that

.gitignore Outdated Show resolved Hide resolved
@vaithak
Copy link
Contributor

vaithak commented Aug 7, 2023

I pushed after making the changes , do I need to create another PR?

You don't need to create another PR.
.idea files are still present in the file changes; you need to remove them from the commit—also, .idea is already present in .gitignore, so there is no need to add it again.

@Sanchay-T
Copy link
Author

I removed the .idea directory and also from .gitignore , is it proper now?

@Sanchay-T
Copy link
Author

@vaithak sir?


@to_ivy_arrays_and_back
def to_list(x):
return x.tolist()
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this extra function?

Copy link
Author

Choose a reason for hiding this comment

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

It was pasted again at the end by mistake , I corrected it.

Copy link
Author

Choose a reason for hiding this comment

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

I pushed again. @vaithak

@vaithak
Copy link
Contributor

vaithak commented Aug 9, 2023

I removed the .idea directory and also from .gitignore , is it proper now?

You need to remove only your changes from the .idea directory, not the already existing files in it.

@vaithak vaithak linked an issue Aug 10, 2023 that may be closed by this pull request
@vaithak
Copy link
Contributor

vaithak commented Aug 10, 2023

@Sanchay-T please rebase your changes on master and make sure to not make any changes in the .idea folder (neither deleting it nor modifying it).

)
@to_ivy_arrays_and_back
def tolist(x):
return ivy.tolist(x)
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, ivy.tolist has no implementation in the functional layer so this won't work. Have you tested this locally?

Copy link
Author

Choose a reason for hiding this comment

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

No , I had trouble checking it locally , as when I imported the file on top and ran , it kept on looks at the ivy package that was installed through req I guess

Copy link
Author

Choose a reason for hiding this comment

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

Should I just delete this all and start again?

Copy link
Contributor

Choose a reason for hiding this comment

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

How will starting over again help? You need to implement the corresponding function in ivy's functional layer and maybe in the backend too. Please read through ivy's documentation to get an understanding on this.

Copy link
Author

Choose a reason for hiding this comment

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

I will go through the documentation once again , but I understood the paddle implementation. I cannot seem to find the implementation of tolist in ivy. Maybe I am wrong and sorry for troubling you. But I know that my function will take the tensor as an input and the output should be the list. But is there something inbuilt?
This is the paddle paddle documentation:
image

And this is what I found in the source code on github of Paddle paddle :
image

I still dont understand the tolist() declaration. It would help me a lot if you can somewhat guide me?
Thankyou

Copy link
Contributor

Choose a reason for hiding this comment

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

I will say the same thing again, go through ivy's documentation to understand what you are missing.

Copy link
Author

Choose a reason for hiding this comment

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

Yes went thorough the entire documentation , understood what I was doing wrong. Thankyou. After I push the corrected code here , is the octernship task complete. I didnt understand where to exactly create a pr , in the webinar on youtube they said , there is another repo that will be created by the ivy team for me , and there I have to push

Copy link
Author

Choose a reason for hiding this comment

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

Also is the issue still allocated to me how do I check , because in the documentation it was mentioned 7 days

@Sanchay-T Sanchay-T changed the title Close #21251 tolist Aug 15, 2023
@Sanchay-T
Copy link
Author

@vaithak sir , I made the proper correction and imported the function and checked it , it is working , but I am getting assertion error while running the tests and I am not able to figure that out. Can you help me , please. I am really trying

@Sanchay-T Sanchay-T requested a review from vaithak August 15, 2023 20:31
Copy link
Contributor

@vaithak vaithak left a comment

Choose a reason for hiding this comment

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

I have fixed the .idea folder and .gitignore which I had requested for multiple times.
The test is failing for all the backends: AssertionError: The length of results from backend numpy and ground truthframework paddle does not match.
Please make sure these are fixed locally.

@Sanchay-T Sanchay-T requested a review from vaithak August 22, 2023 10:08
@Sanchay-T
Copy link
Author

Sanchay-T commented Aug 22, 2023

Thankyou @vaithak , I modified the code checked in my local system. I am not understanding this error. Rest 3 test cases passed successfully : [FAILED ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_manipulation.py::test_paddle_tolist[cpu-numpy-False-False] - AssertionError: The length of results from backend numpy and ground truthframework paddle does not match
FAILED ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_manipulation.py::test_paddle_tolist[cpu-torch-False-False] - AssertionError: The length of results from backend torch and ground truthframework paddle does not match
FAILED ivy_tests/test_ivy/test_frontends/test_paddle/test_tensor/test_manipulation.py::test_paddle_tolist[cpu-paddle-False-False] - AssertionError: The length of results from backend paddle and ground truthframework paddle does not match]

@Sanchay-T
Copy link
Author

Implemented tolist function for PaddlePaddle backend. Fixes #21303.

@Sanchay-T
Copy link
Author

Implemented tolist function for PaddlePaddle backend. Fixes #19170

@Sanchay-T Sanchay-T closed this by deleting the head repository Sep 14, 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.

tolist tolist
3 participants