Closed SalmanMohammadi closed 1 week ago
@SalmanMohammadi Can I work on this?
Hey @varshinimuthukumar1! Thanks for asking. Absolutely. Feel free to put up a PR and ping me on it. : )
Let's come to some consensus about which we should use.
cc @RdoubleA @ebsmothers @felipemello1 @pbontrager choose your fighter
🚀 = torch.Tensor
👀 = Tensor
Why make typing take up more space than it already does?
using Tensor
requires adding an extra import line from torch import Tensor
, you already have torch imported in almost all files just stick with it :)
i think it also bothers me a bit when i see "Tensor". Ok, what type of Tensor? Is it a torch.Tensor? :D
Thanks for assigning this issue to me. I will put up a PR!
Not to throw a wrench in the works here but pytorch also uses Tensor
...
https://pytorch.org/docs/stable/generated/torch.nn.utils.rnn.pad_sequence.html
I see both sides, mild preference for torch.Tensor
I just dont know if the time spent on it is worth on it haha. Since @varshinimuthukumar1 is willing to contribute, maybe the time would be better spent in other tickets with "good first issue" and "community help wanted"
I took up this issue to get a first-feel of the code base, and contribute further.
If it is not needed, I will drop this issue, and start elsewhere :D
I think it would be better, from a priority perspective. The torch.Tensor vs Tensor is cosmetic, but there are plenty of open issues that would have an impact by creating new features or solving small issues that affect users.
Thanks for contributing @varshinimuthukumar1 ! Feel free to share your thoughts and ask questions as you get more familiar with torchtune :)
Sometimes we typehint
torch.Tensor
, sometimes it'sTensor
. Wouldn't it be great if it all looked the same?