Skip to content

v0.0.3.dev0

Summary:
Pull Request resolved: https://github.com/facebookresearch/torcharrow/pull/84

This allows write unified test across eager and lazy (or tracing-based) runtime.

Some runtime may only support transformation across columns from the same dataframe, thus the existing eager mode tests (which creates Column and test them) doesn't work.

The idea is test data is stored in base test class as a CPU dataframe.  And the concrete backend test will convert the CPU dataframe to backend specific dataframe for testing (e.g. GPU or even lazy df) and assert the dataframe transformation has the same behavior.

Python doesn't have native "abstract base test" support. So use this `Raise unittest.SkipTest` trick: https://stackoverflow.com/a/59561905.

Another approach is similar to existing TorchArrow test setup, have `base_test_X` and let subclass to override as `test_X`.

Reviewed By: bhuang3

Differential Revision: D32337291

fbshipit-source-id: 871ccd85891e37e52b2bfbaa9c901c7b265190ac
Assets 2
Loading