data
data copied to clipboard
Validation of `fn` on `input_col` for Datapipes
Fixes #362
Changes
- Document input_col behavior on
FlatMapperIterDataPipe
- Checks the arguments of mapping function against
input_col
inFlatMapperIterDataPipe
Oh, hold on. This will break test_flatmap_iterdatapipe
This breaks test_map_batches_iterdatapipe
, specifically 683 (since there is only 1 argument)
@ejguan, should I modify fn_2_cols
or is that not desired?
Could you please open a PR in PyTorch core by creating the validation function first?
Oh, good idea. Any specific file I should put it in?
I was thinking torch/utils/data/datapipes/datapipe.py
or maybe torch/utils/data/datapipes/utils/__init__.py
You can put it in https://github.com/pytorch/pytorch/blob/master/torch/utils/data/datapipes/utils/common.py
Are the CI failures normal?
If #293 goes through this function may need to be copied back over here.
Right now I am waiting for core to merge my changes
@ejguan Okay to continue working on this now that core has merged?
@ejguan Okay to continue working on this now that core has merged?
Yeah. You can do that. But, you might wait until my PR landed as your PR breaks a few tests for TorchVision and I fixed them in my PR.
Let me close and reopen this now that the validator function has been merged.