Open NivekT opened 3 years ago
This is awesome. One nit note: serializable should be same as picklable IMO.
@NivekT I am concerning about when and how we want to do graph testing. For a single DataPipe instance, the graph testing makes no sense. Then, we may want to construct a datapipe graph by ourselves. The problem is how we can guarantee the testing coverage for all use cases.
We can require each DataPipe to introduce a simple usage example graph for this purpose.
When we have time, we might need to go over our DataPipes again to identify any missing test since there are a few DataPipe implemented recently.
Besides, for future reference, we might need to improve our testing framework to something similar to OpInfo
in PyTorch Core to run the testing coverage automatically without we go over each test by ourselves.
When we have time, we might need to go over our DataPipes again to identify any missing test since there are a few DataPipe implemented recently.
Besides, for future reference, we might need to improve our testing framework to something similar to
OpInfo
in PyTorch Core to run the testing coverage automatically without we go over each test by ourselves.
Agreed that the OpInfo
-like way is probably the best. I think our inputs and necessary setup for each test is a bit all over the place. Having tests split between two repos doesn't help either.
🚀 Feature
We have many tests for existing DataPipes (both in PyTorch Core and TorchData). However, over time, they have become less organized. Moreover, as the testing requirements expand, older DataPipes may not have tests to cover the newly added requirements.
This issue aims to track the status of tests for all DataPipes.
Motivation
We want to ensure test coverage for all DataPipe is complete to reduce bugs and unexpected behavior.
Alternative
We also should create some testing templates for
IterDataPipe
andMapDataPipe
that can be widely applied.IterDataPipe
TrackerX - Done NA - Not Applicable Blank - Not Done/Unclear
Test definitions: Functional - unit test to ensure that the DataPipe works properly with various input arguments Reset - DataPipe can be reset/restart after being read
__len__
- the__len__
method is implemented whenever possible (or explicitly not implemented) Serializable - DataPipe is serializable Graph (future) - can be traversed as part of a DataPipe graph Snapshot (future) - can be saved/loaded as a checkpoint/snapshot__len__
MapDataPipe
TrackerX - Done NA - Not Applicable Blank - Not Done/Unclear
__len__
cc: @ejguan @VitalyFedyunin @NivekT