CoolFace
Datasetpublic

23ws-LLMcoder/LLMcoder-GitHub-Python-Mix-Direct

Dataset Card for LLMcoder-GitHub-Python-Mix-Direct Python target autocomplete suggestions in the format of conversations for OpenAI's fine-tuning. Dataset Details Dataset Description Curated by: [More Information Needed] Funded by [optional]: [More Information Needed] Shared by [optional]: [More Information Needed] Language(s) (NLP): [More Information Needed] License: [More Information Needed] Dataset Sources [optional] The data… See the full description on the dataset page: https://huggingface.co/datasets/23ws-LLMcoder/LLMcoder-GitHub-Python-Mix-Direct.

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes216downloads
input.txt36 linesDownload Raw Back to pair_67
1from nlinec.data.preprocessing import combine_premise_hypothesis, construct_hypothesis, get_granularity, get_type, stringify_context2 3 4def test_stringify_context() -> None:5    context = ['This', 'is', 'a', 'test', '.']6 7    assert stringify_context(context) == 'This is a test.'8 9 10def test_get_granularity() -> None:11    assert get_granularity('/other') == 112    assert get_granularity('/other/test') == 213    assert get_granularity('/correct/horse/battery') == 314 15 16def test_get_type() -> None:17    assert get_type('/other') == 'other'18    assert get_type('/other/test') == 'test'19    assert get_type('/correct/horse/battery') == 'battery'20    assert get_type('/correct/horse/battery', granularity=1) == 'correct'21    assert get_type('/correct/horse/battery', granularity=2) == 'horse'22    assert get_type('/correct/horse/battery', granularity=4) is None23 24 25def test_construct_hypothesis() -> None:26    entity = 'my_entity'27    type = 'my_type'28 29    assert construct_hypothesis(entity, type) == 'my_entity is a my_type.'30 31 32def test_combine_premise_hypothesis() -> None:33    premise = 'This is a premise.'34    hypothesis = 'This is a hypothesis.'35 36    assert combine_premise_hypothesis(premise, hypothesis