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

update torch.where to throw error for single input #192

Merged
merged 10 commits into from
Apr 17, 2024

Conversation

k223kim
Copy link
Contributor

@k223kim k223kim commented Apr 16, 2024

Before submitting
  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes #146. It throws a more descriptive error saying that Thunder is yet to support single input (condition only) torch.where.

PR review

Anyone in the community is free to review the PR once the tests have passed.

Did you have fun?

Loving every bit of this! 🚀

@k223kim k223kim changed the title K223kim/update torch where update torch.where to handle single input Apr 16, 2024
@k223kim k223kim changed the title update torch.where to handle single input update torch.where to throw error for single input Apr 16, 2024
@k223kim k223kim marked this pull request as ready for review April 16, 2024 02:41
thunder/torch/__init__.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

Looks really good except for one small nit about the type annotations on where -- I made a comment for you review

@k223kim
Copy link
Contributor Author

k223kim commented Apr 16, 2024

Hey @mruberry! Thanks for the review :) Just updated my code based on your comments! Can't wait to see my first PR getting merged 🚀

Copy link
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

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

Cool! Thanks @k223kim!

@k223kim
Copy link
Contributor Author

k223kim commented Apr 16, 2024

Just one more question @mruberry! It says "required statuses must pass before merging". Is there anything else I should be working on to merge this PR? It's my first PR so I am not really familiar with this process. ;)

@mruberry
Copy link
Collaborator

Just one more question @mruberry! It says "required statuses must pass before merging". Is there anything else I should be working on to merge this PR? It's my first PR so I am not really familiar with this process. ;)

Nope, nothing else you need to do, @k223kim. Sorry for the confusion.

@t-vi @Borda we should probably think about clarifying the merge process somewhere

@t-vi t-vi merged commit 7a887ad into Lightning-AI:main Apr 17, 2024
39 checks passed
@t-vi
Copy link
Collaborator

t-vi commented Apr 17, 2024

Thank you @k223kim @mruberry .

@mruberry Yes, maybe you can add a little paragraph to @nikitaved (great) contributing section https://lightning-thunder.readthedocs.io/en/latest/advanced/contrib_thunder.html Thank you.

@mruberry
Copy link
Collaborator

Thank you @k223kim @mruberry .

@mruberry Yes, maybe you can add a little paragraph to @nikitaved (great) contributing section lightning-thunder.readthedocs.io/en/latest/advanced/contrib_thunder.html Thank you.

Not sure I'd know what to write.

@k223kim
Copy link
Contributor Author

k223kim commented Apr 18, 2024

@mruberry
Maybe add a small section called When it is ready for my PR to be merged? and add something along the lines of 'All tests are passing, at least one approval'? (something like the following)

When it is ready for my PR to be merged?

  • Is your code passing all tests?
  • Did you get at least one approval?

If so, your PR is ready to be merged! 🚀

@mruberry
Copy link
Collaborator

@mruberry Maybe add a small section called When it is ready for my PR to be merged? and add something along the lines of 'All tests are passing, at least one approval'? (something like the following)

When it is ready for my PR to be merged?

  • Is your code passing all tests?
  • Did you get at least one approval?

If so, your PR is ready to be merged! 🚀

That sounds like a great start, @k223kim!

@github-actions github-actions bot deleted the k223kim/update_torch_where branch July 17, 2024 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update meta-function for where to error on a single input aka where(mark)
3 participants