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

Dispatch based on SeqLikeType.__args__ #42

Closed
ericmjl opened this issue Dec 25, 2021 · 3 comments · Fixed by #46
Closed

Dispatch based on SeqLikeType.__args__ #42

ericmjl opened this issue Dec 25, 2021 · 3 comments · Fixed by #46
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@ericmjl
Copy link
Contributor

ericmjl commented Dec 25, 2021

Also a quick note: when dispatching for SeqLike, I guess we can use SeqLikeType.__args__ as the type instead of hardcoding a list of potential types, otherwise it's hard to keep them consistent (since I saw there's a plan to include torch.tensor)

Originally posted by @pagpires in #41 (comment)

@ericmjl
Copy link
Contributor Author

ericmjl commented Dec 25, 2021

@pagpires do let us know if you'd like to make this happen! Happy to assign it to you.

@ericmjl ericmjl added good first issue Good for newcomers help wanted Extra attention is needed labels Dec 25, 2021
@pagpires
Copy link
Contributor

sure! happy to

@pagpires
Copy link
Contributor

PR: #46
Note that the forward-ref should be removed or replaced (e.g. "torch.tensor" removed, "np.ndarray" replaced with the np.ndarray) to be compatible with dispatch. I also found the circular dependency of SeqLike and SeqLikeType a bit confusing. Let me know if I missed the context for this design or there's a better way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants