Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DataPipes Testing Requirements

Kevin Tse edited this page Jan 19, 2022 · 3 revisions

Besides functional testing of every DataPipe, tests should include:

  • Test if DataPipe resets correctly (#65067)
    • Order of the outputs should be consistent between iterations
 dp = create_dp()
 list1 = list(dp)
 list2 = list(dp)
  • Test if DataPipe iterators are independent (should not be expected in multiprocessing, but good coding pattern)
  • Test if DataPipe is serializable
  • Test if DataPipe has __len__ correctly implemented or throws an expected error
  • Test if DataPipe is lazy (serialized size is 'reasonable')
  • Test how DataPipe works in deterministic context
  • Test if DataPipes creates properly linked DataPipes graph
  • Test if DataPipe is picklable (using pickle or dill)
    • Test if it is still picklable after the DataPipe has been iterated through.

Ideally, there are examples and helper functions for each of these requirements.

TODO: Some of these requirements are only relevant for IterDataPipe, we also need to requirements for MapDataPipe.

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.