data_juicer.utils.unittest_utils module

data_juicer.utils.unittest_utils.TEST_TAG(*tags)[源代码]

Tags for test case. Currently, standalone, ray are supported.

data_juicer.utils.unittest_utils.set_clear_model_flag(flag)[源代码]
data_juicer.utils.unittest_utils.set_from_fork_flag(flag)[源代码]
class data_juicer.utils.unittest_utils.DataJuicerTestCaseBase(methodName='runTest')[源代码]

基类:TestCase

classmethod setUpClass()[源代码]

Hook method for setting up class fixture before running tests in the class.

classmethod tearDownClass(hf_model_name=None) None[源代码]

Hook method for deconstructing the class fixture after running all tests in the class.

setUp()[源代码]

Hook method for setting up the test fixture before exercising it.

tearDown() None[源代码]

Hook method for deconstructing the test fixture after testing it.

generate_dataset(data) DJDataset[源代码]

Generate dataset for a specific executor.

参数:
  • type (str, optional) -- "standalone" or "ray".

  • "standalone". (Defaults to)

run_single_op(dataset: DJDataset, op, column_names)[源代码]

Run operator in the specific executor.

assertDatasetEqual(first, second)[源代码]
data_juicer.utils.unittest_utils.get_diff_files(prefix_filter=['data_juicer/', 'tests/'])[源代码]

Get git diff files in target dirs except the __init__.py files

data_juicer.utils.unittest_utils.find_corresponding_test_file(file_path)[源代码]
data_juicer.utils.unittest_utils.get_partial_test_cases()[源代码]