ivy icon indicating copy to clipboard operation
ivy copied to clipboard

Added new_zeros instance method to PyTorch frontend #5733

Open kivimike opened this issue 2 years ago • 7 comments

I have implemented the method but I'm currently struggling with writing a working test. I've used the new_ones method as a reference and found that the test for that method was not working properly (it was generating a tensor filled with floats). I've figered out how to set a specific value (in my case its zero), how to create a strategy that uses shapes from a given range, but I don't know understand how create identical shapes for both: the test tensor and for the method input. I've tried to use st.shared, but in this case it still doesn't really generate the same shape for both cases.

kivimike avatar Oct 16 '22 18:10 kivimike

Hey @kivimike great work so far, can you kindly resolve the conflicts? Also, I'll link this to the corresponding issue, but in the future, you should do this yourself by adding a comment ‘Close #Issue_number’, as explained here. Once this is done, I'll take a closer look at the issue you are having and see if I can help. Thanks!

ogbanugot avatar Oct 17 '22 10:10 ogbanugot

Close #5733

ogbanugot avatar Oct 17 '22 10:10 ogbanugot

Hey @kivimike great work so far, can you kindly resolve the conflicts? Also, I'll link this to the corresponding issue, but in the future, you should do this yourself by adding a comment ‘Close #Issue_number’, as explained here. Once this is done, I'll take a closer look at the issue you are having and see if I can help. Thanks!

Could you review my code? I resolved the conflicts.

kivimike avatar Oct 17 '22 20:10 kivimike

Close #5799

kivimike avatar Oct 18 '22 15:10 kivimike

Hey @kivimike, the PR looks good but I don't think the test is passing (I ran it locally). Kindly confirm please.

ogbanugot avatar Oct 19 '22 09:10 ogbanugot

Hey @kivimike, the PR looks good but I don't think the test is passing (I ran it locally). Kindly confirm please. I haven't fixed the test yet because I still have the same issue as I wrote above. I've only resolved conflicts with the main branch. Please have a look at my previous comment.

kivimike avatar Oct 19 '22 10:10 kivimike

Okay, seen! You might want to use a composite strategy i.e st.composite to create your inputs that way you can have more control over the shapes. In anycase, I don't think the PR is the best place to ask for help though if you are having issues. Feel free to ask a question on our discord, that way you can have a better discussion about the issues you are facing.

ogbanugot avatar Oct 19 '22 10:10 ogbanugot

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 Nov 06 '22 14:11 ivy-seed

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 Nov 14 '22 06:11 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 Nov 14 '22 07:11 ivy-seed