MCPcopy Create free account
hub / github.com/huggingface/transformers / make_test_data_dir

Function make_test_data_dir

examples/seq2seq/test_seq2seq_examples.py:96–101  ·  view source on GitHub ↗
(**kwargs)

Source from the content-addressed store, hash-verified

94
95
96def make_test_data_dir(**kwargs):
97 tmp_dir = Path(tempfile.mkdtemp(**kwargs))
98 for split in ["train", "val", "test"]:
99 _dump_articles((tmp_dir / f"{split}.source"), ARTICLES)
100 _dump_articles((tmp_dir / f"{split}.target"), SUMMARIES)
101 return tmp_dir
102
103
104class TestSummarizationDistiller(unittest.TestCase):

Callers 3

_test_distiller_cliMethod · 0.85
test_finetuneFunction · 0.85
test_datasetFunction · 0.85

Calls 1

_dump_articlesFunction · 0.85

Tested by

no test coverage detected