-
Notifications
You must be signed in to change notification settings - Fork 152
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
Add validation between input_col
and fn
for Callable DataPipes
#362
Comments
I'd like to work on this if possible |
@davidegavio |
Was this ever worked on? If not I could take a stab at this. |
Hi @davidegavio, do you still have plan to work on this issue? |
I'll give this a try when I get home |
@ejguan just to check, is this to check that fn has type annotations for returning a Sequence? |
If the provided Let's say there is only 1 argument in |
What does |
Yeah. Let's say you have a DataPipe yielding tuples like dp = IterableWrapper([(1, 2), (3, 4), ...])
dp = dp.map(lambda x: x + 1, input_col=1) And, We should add inline doc to explain the behavior of |
Alright, I will work on this and open a PR. |
) As linked in pytorch/data#362 Pull Request resolved: #79344 Approved by: https://github.com/ejguan, https://github.com/NivekT
) (#79344) Summary: As linked in pytorch/data#362 Pull Request resolved: #79344 Approved by: https://github.com/ejguan, https://github.com/NivekT Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/787ac4edf8d774f2f26378e1da8e620995555b7d Reviewed By: seemethere Differential Revision: D37417346 Pulled By: seemethere fbshipit-source-id: f357e78d73346e506fd146f15c57118a083878de
🚀 The feature
Using
inspect
to validate theinput_col
matchingfn
input forMapper
,Flatmapper
and other DataPipe using bothinput_col
andfn
as the arguments.Mapper
Filter
Flatmap
BatchMap
Motivation, pitch
This would help users to identify the wrong arguments at the construction time for such
IterDataPipe
rather than at iteration time.Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: