repo_id stringclasses 400
values | commit_sha stringclasses 400
values | commit_index int32 0 951 | in_repo_split stringclasses 1
value | cross_repo_split stringclasses 1
value | test_file stringlengths 7 121 | test_function stringlengths 1 108 | assertion_type stringclasses 32
values | difficulty stringclasses 8
values | context_lines int32 3 600 | prefix large_stringlengths 44 113k | target large_stringlengths 1 498 | anchor_sha stringclasses 400
values | anchor_index int32 0 951 | qna_source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_searchable_attributes_meilisearch.py | test_update_searchable_attributes | assert | variable | 12 | NEW_SEARCHABLE_ATTRIBUTES = ["something", "random"]
def test_update_searchable_attributes(empty_index):
"""Tests updating the searchable attributes."""
index = empty_index()
response = index.update_searchable_attributes(NEW_SEARCHABLE_ATTRIBUTES)
index.wait_for_task(response.task_uid)
response = in... | response | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_searchable_attributes_meilisearch.py | test_update_searchable_attributes_to_none | assert | string_literal | 10 | NEW_SEARCHABLE_ATTRIBUTES = ["something", "random"]
def test_update_searchable_attributes_to_none(empty_index):
"""Tests updating the searchable attributes at null."""
index = empty_index()
# Update the settings first
response = index.update_searchable_attributes(NEW_SEARCHABLE_ATTRIBUTES)
update =... | "succeeded" | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_searchable_attributes_meilisearch.py | test_update_searchable_attributes | assert | func_call | 10 | NEW_SEARCHABLE_ATTRIBUTES = ["something", "random"]
def test_update_searchable_attributes(empty_index):
"""Tests updating the searchable attributes."""
index = empty_index()
response = index.update_searchable_attributes(NEW_SEARCHABLE_ATTRIBUTES)
index.wait_for_task(response.task_uid)
response = in... | len(NEW_SEARCHABLE_ATTRIBUTES) | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_sortable_attributes_meilisearch.py | test_get_sortable_attributes | assert | collection | 7 | SORTABLE_ATTRIBUTES = ["title", "release_date"]
def test_get_sortable_attributes(empty_index):
"""Tests getting the sortable attributes."""
response = empty_index().get_sortable_attributes()
assert response == | [] | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_sortable_attributes_meilisearch.py | test_update_sortable_attributes_to_none | assert | string_literal | 10 | SORTABLE_ATTRIBUTES = ["title", "release_date"]
def test_update_sortable_attributes_to_none(empty_index):
"""Tests updating the sortable attributes at null."""
index = empty_index()
# Update the settings first
response = index.update_sortable_attributes(SORTABLE_ATTRIBUTES)
update = index.wait_for_... | "succeeded" | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_sortable_attributes_meilisearch.py | test_update_sortable_attributes | assert | variable | 12 | SORTABLE_ATTRIBUTES = ["title", "release_date"]
def test_update_sortable_attributes(empty_index):
"""Tests updating the sortable attributes."""
index = empty_index()
response = index.update_sortable_attributes(SORTABLE_ATTRIBUTES)
index.wait_for_task(response.task_uid)
get_attributes = index.get_so... | get_attributes | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_sortable_attributes_meilisearch.py | test_update_sortable_attributes | assert | func_call | 10 | SORTABLE_ATTRIBUTES = ["title", "release_date"]
def test_update_sortable_attributes(empty_index):
"""Tests updating the sortable attributes."""
index = empty_index()
response = index.update_sortable_attributes(SORTABLE_ATTRIBUTES)
index.wait_for_task(response.task_uid)
get_attributes = index.get_so... | len(SORTABLE_ATTRIBUTES) | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_stop_words_meilisearch.py | test_get_stop_words_default | assert | collection | 7 | NEW_STOP_WORDS = ["of", "the"]
def test_get_stop_words_default(empty_index):
"""Tests getting stop words by default."""
response = empty_index().get_stop_words()
assert response == | [] | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_stop_words_meilisearch.py | test_update_stop_words | assert | variable | 12 | NEW_STOP_WORDS = ["of", "the"]
def test_update_stop_words(empty_index):
"""Tests updating the stop words."""
index = empty_index()
response = index.update_stop_words(NEW_STOP_WORDS)
update = index.wait_for_task(response.task_uid)
assert update.status == "succeeded"
response = index.get_stop_wor... | response | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_stop_words_meilisearch.py | test_update_stop_words | assert | string_literal | 9 | NEW_STOP_WORDS = ["of", "the"]
def test_update_stop_words(empty_index):
"""Tests updating the stop words."""
index = empty_index()
response = index.update_stop_words(NEW_STOP_WORDS)
update = index.wait_for_task(response.task_uid)
assert update.status == | "succeeded" | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_synonyms_meilisearch.py | test_get_synonyms_default | assert | collection | 7 | NEW_SYNONYMS = {"hp": ["harry potter"]}
def test_get_synonyms_default(empty_index):
"""Tests getting default synonyms."""
response = empty_index().get_synonyms()
assert response == | {} | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_synonyms_meilisearch.py | test_update_synonyms | assert | variable | 12 | NEW_SYNONYMS = {"hp": ["harry potter"]}
def test_update_synonyms(empty_index):
"""Tests updating synonyms."""
index = empty_index()
response = index.update_synonyms(NEW_SYNONYMS)
update = index.wait_for_task(response.task_uid)
assert update.status == "succeeded"
response = index.get_synonyms()
... | response | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_synonyms_meilisearch.py | test_update_synonyms | assert | string_literal | 9 | NEW_SYNONYMS = {"hp": ["harry potter"]}
def test_update_synonyms(empty_index):
"""Tests updating synonyms."""
index = empty_index()
response = index.update_synonyms(NEW_SYNONYMS)
update = index.wait_for_task(response.task_uid)
assert update.status == | "succeeded" | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_text_separators_meilisearch.py | test_get_separator_tokens_default | assert | collection | 8 | NEW_SEPARATOR_TOKENS = ["|", "…"]
NEW_NON_SEPARATOR_TOKENS = ["@", "#"]
def test_get_separator_tokens_default(empty_index):
"""Tests getting the default value of separator tokens."""
separator_tokens = empty_index().get_separator_tokens()
assert separator_tokens == | [] | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_text_separators_meilisearch.py | test_update_separator_tokens | assert | string_literal | 10 | NEW_SEPARATOR_TOKENS = ["|", "…"]
NEW_NON_SEPARATOR_TOKENS = ["@", "#"]
def test_update_separator_tokens(empty_index):
"""Tests updating the separator tokens."""
index = empty_index()
task = index.update_separator_tokens(NEW_SEPARATOR_TOKENS)
task = index.wait_for_task(task.task_uid)
assert... | "succeeded" | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_text_separators_meilisearch.py | test_update_separator_tokens | assert | variable | 14 | NEW_SEPARATOR_TOKENS = ["|", "…"]
NEW_NON_SEPARATOR_TOKENS = ["@", "#"]
def test_update_separator_tokens(empty_index):
"""Tests updating the separator tokens."""
index = empty_index()
task = index.update_separator_tokens(NEW_SEPARATOR_TOKENS)
task = index.wait_for_task(task.task_uid)
assert ... | separator_tokens | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_text_separators_meilisearch.py | test_update_non_separator_tokens | assert | variable | 14 | NEW_SEPARATOR_TOKENS = ["|", "…"]
NEW_NON_SEPARATOR_TOKENS = ["@", "#"]
def test_update_non_separator_tokens(empty_index):
"""Tests updating the non separator tokens."""
index = empty_index()
task = index.update_non_separator_tokens(NEW_NON_SEPARATOR_TOKENS)
task = index.wait_for_task(task.task_... | non_separator_tokens | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_typo_tolerance_meilisearch.py | test_update_typo_tolerance | assert | string_literal | 29 | DEFAULT_TYPO_TOLERANCE = {
"enabled": True,
"minWordSizeForTypos": {
"oneTypo": 5,
"twoTypos": 9,
},
"disableOnWords": [],
"disableOnAttributes": [],
}
NEW_TYPO_TOLERANCE = {
"enabled": True,
"minWordSizeForTypos": {
"oneTypo": 6,
"twoTypos": 10,
},
"... | "succeeded" | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_typo_tolerance_meilisearch.py | test_get_typo_tolerance_default | assert | variable | 26 | DEFAULT_TYPO_TOLERANCE = {
"enabled": True,
"minWordSizeForTypos": {
"oneTypo": 5,
"twoTypos": 9,
},
"disableOnWords": [],
"disableOnAttributes": [],
}
NEW_TYPO_TOLERANCE = {
"enabled": True,
"minWordSizeForTypos": {
"oneTypo": 6,
"twoTypos": 10,
},
"... | DEFAULT_TYPO_TOLERANCE | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_typo_tolerance_meilisearch.py | test_update_typo_tolerance | assert | func_call | 31 | DEFAULT_TYPO_TOLERANCE = {
"enabled": True,
"minWordSizeForTypos": {
"oneTypo": 5,
"twoTypos": 9,
},
"disableOnWords": [],
"disableOnAttributes": [],
}
NEW_TYPO_TOLERANCE = {
"enabled": True,
"minWordSizeForTypos": {
"oneTypo": 6,
"twoTypos": 10,
},
"... | response_get.model_dump(by_alias=True) | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/settings/test_settings_typo_tolerance_meilisearch.py | test_update_typo_tolerance | assert | func_call | 32 | DEFAULT_TYPO_TOLERANCE = {
"enabled": True,
"minWordSizeForTypos": {
"oneTypo": 5,
"twoTypos": 9,
},
"disableOnWords": [],
"disableOnAttributes": [],
}
NEW_TYPO_TOLERANCE = {
"enabled": True,
"minWordSizeForTypos": {
"oneTypo": 6,
"twoTypos": 10,
},
"... | response_get.model_dump(by_alias=True)[typo_tolerance] | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/test_utils.py | test_is_pydantic_2 | assert | bool_literal | 9 | from datetime import datetime, timezone
import pytest
from meilisearch._utils import is_pydantic_2, iso_to_date_time
def test_is_pydantic_2():
assert is_pydantic_2() is | True | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/test_utils.py | test_iso_to_date_time | assert | variable | 24 | from datetime import datetime, timezone
import pytest
from meilisearch._utils import is_pydantic_2, iso_to_date_time
@pytest.mark.parametrize(
"iso_date, expected",
[
("2021-05-11T03:12:22.563960100Z", datetime(2021, 5, 11, 3, 12, 22, 563960)),
("2021-05-11T03:12:22.563960100+00:00", datetime... | expected | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meilisearch/meilisearch-python | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | train | train | tests/test_utils.py | test_iso_to_date_time_invalid_format | pytest.raises | variable | 9 | from datetime import datetime, timezone
import pytest
from meilisearch._utils import is_pydantic_2, iso_to_date_time
def test_iso_to_date_time_invalid_format():
with pytest.raises( | ValueError) | 1038e4d1633c84aef8c5937dd26fae00c55738f9 | 115 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/functional/test_cli.py | test_system_check_command_vllm | assert | numeric_literal | 26 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from typer.testing import CliRunner
from synthetic_data_kit.cli import app
@pytest.mark.functional
def test_system_check_command_vllm(patch_config):
"""Test the system-check command with vLLM provider."""
runner = ... | 0 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/functional/test_cli.py | test_ingest_command | assert | variable | 38 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from typer.testing import CliRunner
from synthetic_data_kit.cli import app
@pytest.mark.functional
def test_ingest_command(patch_config):
"""Test the ingest command with a text file."""
runner = CliRunner()
wi... | input_path | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/functional/test_cli.py | test_system_check_command_vllm | assert | complex_expr | 28 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from typer.testing import CliRunner
from synthetic_data_kit.cli import app
@pytest.mark.functional
def test_system_check_command_vllm(patch_config):
"""Test the system-check command with vLLM provider."""
runner = ... | result.stdout | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/functional/test_multimodal.py | test_ingest_pdf_default | assert | numeric_literal | 46 | import os
import shutil
import subprocess
import pytest
import requests
import lance
PDF_URL = "https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf"
PDF_FILENAME = "sample_multimodal.pdf"
OUTPUT_DIR = "test_output"
def setup_module():
"""Download the test PDF and creat... | 0 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/functional/test_multimodal.py | test_ingest_pdf_default | assert | complex_expr | 50 | import os
import shutil
import subprocess
import pytest
import requests
import lance
PDF_URL = "https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf"
PDF_FILENAME = "sample_multimodal.pdf"
OUTPUT_DIR = "test_output"
def setup_module():
"""Download the test PDF and creat... | schema.names | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/functional/test_preview_mode.py | test_create_preview_mode | assert | numeric_literal | 32 | import os
import tempfile
import json
from unittest.mock import patch
import pytest
@pytest.mark.functional
def test_create_preview_mode(patch_config):
"""Test create command with --preview flag."""
temp_dir = tempfile.mkdtemp()
try:
# Create test .txt files for create command
txt_fil... | 0 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/functional/test_preview_mode.py | test_create_preview_mode | assert | complex_expr | 33 | import os
import tempfile
import json
from unittest.mock import patch
import pytest
@pytest.mark.functional
def test_create_preview_mode(patch_config):
"""Test create command with --preview flag."""
temp_dir = tempfile.mkdtemp()
try:
# Create test .txt files for create command
txt_fil... | result.stdout | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_backward_compatibility.py | test_single_file_ingest_still_works | assert | numeric_literal | 32 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
@pytest.mark.integration
def test_single_file_ingest_still_works(patch_config):
"""Test that single file ingest processing works unchanged."""
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt", delete=False) ... | 0 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_backward_compatibility.py | test_single_file_error_handling_unchanged | assert | numeric_literal | 23 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
@pytest.mark.integration
def test_single_file_error_handling_unchanged():
"""Test that single file error handling works as before."""
# Test with non-existent file by calling the CLI function directly
from synth... | 1 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_backward_compatibility.py | test_single_file_ingest_still_works | assert | variable | 38 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
@pytest.mark.integration
def test_single_file_ingest_still_works(patch_config):
"""Test that single file ingest processing works unchanged."""
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt", delete=False) ... | input_file | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_backward_compatibility.py | test_single_file_ingest_still_works | assert | variable | 39 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
@pytest.mark.integration
def test_single_file_ingest_still_works(patch_config):
"""Test that single file ingest processing works unchanged."""
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt", delete=False) ... | output_dir | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_backward_compatibility.py | test_single_file_with_name_option | assert | variable | 38 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
@pytest.mark.integration
def test_single_file_with_name_option():
"""Test that --name option still works for single files."""
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt", delete=False) as f:
f.w... | custom_name | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_backward_compatibility.py | test_single_file_ingest_still_works | assert | complex_expr | 33 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
@pytest.mark.integration
def test_single_file_ingest_still_works(patch_config):
"""Test that single file ingest processing works unchanged."""
with tempfile.NamedTemporaryFile(mode="w", suffix=".txt", delete=False) ... | result.stdout | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_create_flow.py | test_process_file | assert | none_literal | 61 | import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.core import create
@pytest.mark.integration
def test_process_file(patch_config, test_env):
"""Test processing a file to generate QA pairs."""
with tempfile.NamedTemporaryFile(mode="w+", delete=False) as... | None | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_create_flow.py | test_process_directory | assert | variable | 80 | import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.core import create
@pytest.mark.integration
def test_process_directory(patch_config, test_env):
"""Test processing a directory to generate QA pairs."""
# Create a temporary directory with test files
... | results | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_create_flow.py | test_process_directory | assert | func_call | 76 | import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.core import create
@pytest.mark.integration
def test_process_directory(patch_config, test_env):
"""Test processing a directory to generate QA pairs."""
# Create a temporary directory with test files
... | len(file_paths) | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_directory_edge_cases.py | test_empty_directory_handling | assert | numeric_literal | 33 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
from synthetic_data_kit.utils.directory_processor import (
process_directory_ingest,
process_directory_save_as,
get_directory_stats,
INGEST_EXTENSIONS,
SAVE_AS_EXTENSIONS
)
@pytest.mark.integration
def ... | 0 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_directory_edge_cases.py | test_directory_stats_functionality | assert | numeric_literal | 39 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
from synthetic_data_kit.utils.directory_processor import (
process_directory_ingest,
process_directory_save_as,
get_directory_stats,
INGEST_EXTENSIONS,
SAVE_AS_EXTENSIONS
)
@pytest.mark.integration
def ... | 3 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_directory_edge_cases.py | test_directory_stats_functionality | assert | numeric_literal | 40 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
from synthetic_data_kit.utils.directory_processor import (
process_directory_ingest,
process_directory_save_as,
get_directory_stats,
INGEST_EXTENSIONS,
SAVE_AS_EXTENSIONS
)
@pytest.mark.integration
def ... | 2 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_directory_edge_cases.py | test_directory_stats_functionality | assert | numeric_literal | 41 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
from synthetic_data_kit.utils.directory_processor import (
process_directory_ingest,
process_directory_save_as,
get_directory_stats,
INGEST_EXTENSIONS,
SAVE_AS_EXTENSIONS
)
@pytest.mark.integration
def ... | 1 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_directory_edge_cases.py | test_nonexistent_directory_error | assert | variable | 24 | import os
import tempfile
import json
from unittest.mock import patch, MagicMock
import pytest
from synthetic_data_kit.utils.directory_processor import (
process_directory_ingest,
process_directory_save_as,
get_directory_stats,
INGEST_EXTENSIONS,
SAVE_AS_EXTENSIONS
)
@pytest.mark.integration
def ... | stats | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_end_to_end_workflow.py | test_complete_workflow | assert | numeric_literal | 156 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.core import create, ingest, save_as
from synthetic_data_kit.parsers.txt_parser import TXTParser
@pytest.mark.integration
def test_complete_workflow(patch_config, test_env):
"""Test the complete ... | 1 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_end_to_end_workflow.py | test_complete_workflow | assert | variable | 148 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.core import create, ingest, save_as
from synthetic_data_kit.parsers.txt_parser import TXTParser
@pytest.mark.integration
def test_complete_workflow(patch_config, test_env):
"""Test the complete ... | final_path | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_end_to_end_workflow.py | test_complete_workflow | assert | string_literal | 160 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.core import create, ingest, save_as
from synthetic_data_kit.parsers.txt_parser import TXTParser
@pytest.mark.integration
def test_complete_workflow(patch_config, test_env):
"""Test the complete ... | "What is the document about?" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_end_to_end_workflow.py | test_complete_workflow | assert | string_literal | 161 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.core import create, ingest, save_as
from synthetic_data_kit.parsers.txt_parser import TXTParser
@pytest.mark.integration
def test_complete_workflow(patch_config, test_env):
"""Test the complete ... | "Synthetic data generation techniques." | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_save_as_flow.py | test_convert_format | assert | numeric_literal | 49 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import save_as
@pytest.mark.integration
def test_convert_format():
"""Test converting QA pairs to different formats."""
# Create sample QA pairs
qa_pairs = [
{
"question": ... | 2 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_save_as_flow.py | test_convert_format_with_filtered_pairs | assert | numeric_literal | 55 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import save_as
@pytest.mark.integration
def test_convert_format_with_filtered_pairs():
"""Test converting filtered_pairs to different formats."""
# Create sample QA pairs with ratings
filtered... | 3 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_save_as_flow.py | test_process_multiple_files | assert | numeric_literal | 63 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import save_as
@pytest.mark.integration
def test_process_multiple_files():
"""Test processing multiple files."""
# Create sample QA pairs
qa_pairs1 = [
{
"question": "What ... | 0 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_save_as_flow.py | test_process_multiple_files | assert | numeric_literal | 76 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import save_as
@pytest.mark.integration
def test_process_multiple_files():
"""Test processing multiple files."""
# Create sample QA pairs
qa_pairs1 = [
{
"question": "What ... | 1 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_save_as_flow.py | test_convert_format_with_filtered_pairs | assert | string_literal | 59 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import save_as
@pytest.mark.integration
def test_convert_format_with_filtered_pairs():
"""Test converting filtered_pairs to different formats."""
# Create sample QA pairs with ratings
filtered... | "user" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/integration/test_save_as_flow.py | test_convert_format | assert | complex_expr | 76 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import save_as
@pytest.mark.integration
def test_convert_format():
"""Test converting QA pairs to different formats."""
# Create sample QA pairs
qa_pairs = [
{
"question": ... | data[0] | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_additional_parsers.py | test_docx_parser_initialization | assert | none_literal | 17 | import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.parsers.docx_parser import DOCXParser
from synthetic_data_kit.parsers.ppt_parser import PPTParser
from synthetic_data_kit.parsers.youtube_parser import YouTubeParser
class TestDOCXParser:
def test_docx_par... | None | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_additional_parsers.py | test_youtube_parse_success | assert | variable | 50 | import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.parsers.docx_parser import DOCXParser
from synthetic_data_kit.parsers.ppt_parser import PPTParser
from synthetic_data_kit.parsers.youtube_parser import YouTubeParser
class TestYouTubeParser:
@patch("builti... | result | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_additional_parsers.py | test_docx_save | assert | variable | 26 | import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.parsers.docx_parser import DOCXParser
from synthetic_data_kit.parsers.ppt_parser import PPTParser
from synthetic_data_kit.parsers.youtube_parser import YouTubeParser
class TestDOCXParser:
def test_docx_sav... | content | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_additional_parsers.py | test_docx_parse_success | assert | variable | 52 | import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.parsers.docx_parser import DOCXParser
from synthetic_data_kit.parsers.ppt_parser import PPTParser
from synthetic_data_kit.parsers.youtube_parser import YouTubeParser
class TestDOCXParser:
@patch("builtins.... | expected | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_additional_parsers.py | test_docx_parse_success | assert | variable | 55 | import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.parsers.docx_parser import DOCXParser
from synthetic_data_kit.parsers.ppt_parser import PPTParser
from synthetic_data_kit.parsers.youtube_parser import YouTubeParser
class TestDOCXParser:
@patch("builtins.... | import_calls | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_additional_parsers.py | test_docx_parse_success | assert_* | string_literal | 56 | import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.parsers.docx_parser import DOCXParser
from synthetic_data_kit.parsers.ppt_parser import PPTParser
from synthetic_data_kit.parsers.youtube_parser import YouTubeParser
class TestDOCXParser:
@patch("builtins.... | "/fake/path.docx") | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_app_context_initialization_custom_config | assert | collection | 19 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_app_context_initialization_custom_config(self):
"""Test AppContext initialization with custom config path"""
cust... | {} | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_config_path_type_handling | assert | variable | 24 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_config_path_type_handling(self):
"""Test that config_path handles different path types correctly"""
with patch.ob... | path_obj | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_app_context_initialization_custom_config | assert | variable | 18 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_app_context_initialization_custom_config(self):
"""Test AppContext initialization with custom config path"""
cust... | custom_path | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_config_path_type_handling | assert | variable | 19 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_config_path_type_handling(self):
"""Test that config_path handles different path types correctly"""
with patch.ob... | string_path | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_config_attribute_mutable | assert | string_literal | 23 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_config_attribute_mutable(self):
"""Test that config attribute can be modified"""
with patch.object(AppContext, "_... | "test_value" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_ensure_data_dirs | assert_* | variable | 47 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
@patch("synthetic_data_kit.core.context.os.makedirs")
@patch("synthetic_data_kit.core.context.load_config")
def test_ensure_data_d... | expected_dir) | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_config_attribute_mutable | assert | string_literal | 27 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_config_attribute_mutable(self):
"""Test that config attribute can be modified"""
with patch.object(AppContext, "_... | "inner_value" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_multiple_instances_independent | assert | complex_expr | 26 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_multiple_instances_independent(self):
"""Test that multiple AppContext instances are independent"""
with patch.ob... | context1.config | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_multiple_instances_independent | assert | complex_expr | 27 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_multiple_instances_independent(self):
"""Test that multiple AppContext instances are independent"""
with patch.ob... | context2.config | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_ensure_data_dirs | assert | func_call | 43 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
@patch("synthetic_data_kit.core.context.os.makedirs")
@patch("synthetic_data_kit.core.context.load_config")
def test_ensure_data_d... | len(expected_dirs) | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_multiple_instances_independent | assert | complex_expr | 20 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_multiple_instances_independent(self):
"""Test that multiple AppContext instances are independent"""
with patch.ob... | context2.config_path | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_app_context_initialization_default_config | assert | string_literal | 18 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
def test_app_context_initialization_default_config(self):
"""Test AppContext initialization with default config path"""
wi... | "/fake/default/path" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_context.py | test_ensure_data_dirs_exception_handling | pytest.raises | complex_expr | 36 | import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from synthetic_data_kit.core.context import AppContext
class TestAppContext:
@patch("synthetic_data_kit.core.context.os.makedirs")
@patch("synthetic_data_kit.core.context.load_config")
def test_ensure_data_d... | OSError, match="Permission denied") | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_parse_json_output | assert | numeric_literal | 39 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_parse_json_output():
"""Test parsing JSON output from LLM."""
# Create mock LLM client
mock_client = MagicMock()
# Initialize generator
ge... | 2 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_generate_cot_examples | assert | numeric_literal | 49 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_generate_cot_examples(patch_config):
"""Test generating chain-of-thought examples."""
# Create mock LLM client with config
mock_client = MagicMock(... | 3 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_generate_cot_examples | assert | numeric_literal | 58 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_generate_cot_examples(patch_config):
"""Test generating chain-of-thought examples."""
# Create mock LLM client with config
mock_client = MagicMock(... | 0 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_cot_generator_initialization | assert | none_literal | 20 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_cot_generator_initialization(patch_config):
"""Test COT generator initialization."""
# Create mock LLM client
mock_client = MagicMock()
# Init... | None | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_enhance_with_cot | assert | string_literal | 77 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_enhance_with_cot(patch_config):
"""Test enhancing existing conversations with COT reasoning."""
# Create mock LLM client with config
mock_client = ... | "user" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_process_document | assert | variable | 49 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_process_document(patch_config):
"""Test processing a document to generate COT examples."""
# Create mock LLM client with config
mock_client = Magic... | result | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_enhance_with_cot | assert | string_literal | 76 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_enhance_with_cot(patch_config):
"""Test enhancing existing conversations with COT reasoning."""
# Create mock LLM client with config
mock_client = ... | "system" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_parse_json_output | assert | complex_expr | 41 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_parse_json_output():
"""Test parsing JSON output from LLM."""
# Create mock LLM client
mock_client = MagicMock()
# Initialize generator
ge... | result[0] | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_cot_generator_initialization | assert | variable | 19 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_cot_generator_initialization(patch_config):
"""Test COT generator initialization."""
# Create mock LLM client
mock_client = MagicMock()
# Init... | mock_client | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_cot_generator.py | test_generate_cot_examples | assert | complex_expr | 53 | import json
from unittest.mock import MagicMock
import pytest
from synthetic_data_kit.generators.cot_generator import COTGenerator
@pytest.mark.unit
def test_generate_cot_examples(patch_config):
"""Test generating chain-of-thought examples."""
# Create mock LLM client with config
mock_client = MagicMock(... | examples[0] | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_error_handling.py | test_parse_qa_pairs_invalid_json | assert | complex_expr | 36 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import create, curate, save_as
from synthetic_data_kit.models.llm_client import LLMClient
from synthetic_data_kit.utils.llm_processing import parse_qa_pairs
@pytest.mark.unit
def test_parse_qa_pairs_inval... | result[0] | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_error_handling.py | test_llm_client_error_handling | pytest.raises | variable | 21 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import create, curate, save_as
from synthetic_data_kit.models.llm_client import LLMClient
from synthetic_data_kit.utils.llm_processing import parse_qa_pairs
@pytest.mark.unit
def test_llm_client_error_han... | Exception) | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_error_handling.py | test_save_as_unknown_format | pytest.raises | variable | 35 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import create, curate, save_as
from synthetic_data_kit.models.llm_client import LLMClient
from synthetic_data_kit.utils.llm_processing import parse_qa_pairs
@pytest.mark.unit
def test_save_as_unknown_form... | ValueError) | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_error_handling.py | test_llm_client_error_handling | assert | func_call | 25 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import create, curate, save_as
from synthetic_data_kit.models.llm_client import LLMClient
from synthetic_data_kit.utils.llm_processing import parse_qa_pairs
@pytest.mark.unit
def test_llm_client_error_han... | str(excinfo.value) | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_error_handling.py | test_create_invalid_content_type | assert | func_call | 35 | import json
import os
import tempfile
from unittest.mock import patch
import pytest
from synthetic_data_kit.core import create, curate, save_as
from synthetic_data_kit.models.llm_client import LLMClient
from synthetic_data_kit.utils.llm_processing import parse_qa_pairs
@pytest.mark.unit
def test_create_invalid_conte... | str(excinfo.value).lower() | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_jsonl | assert | numeric_literal | 51 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_jsonl():
"""Test conversion to JSONL format."""... | 2 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_fine_tuning | assert | numeric_literal | 55 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_fine_tuning():
"""Test conversion to fine-tunin... | 3 | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_alpaca | assert | string_literal | 60 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_alpaca():
"""Test conversion to Alpaca format."... | "" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_fine_tuning | assert | string_literal | 59 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_fine_tuning():
"""Test conversion to fine-tunin... | "user" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_alpaca | assert | complex_expr | 54 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_alpaca():
"""Test conversion to Alpaca format."... | data[0] | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_fine_tuning | assert | string_literal | 58 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_fine_tuning():
"""Test conversion to fine-tunin... | "system" | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_hf_dataset | assert | variable | 51 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_hf_dataset():
"""Test conversion to Hugging Fac... | call_args | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_chatml | assert | variable | 57 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_chatml():
"""Test conversion to ChatML format."... | line1_data | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_jsonl | assert | variable | 41 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_jsonl():
"""Test conversion to JSONL format."""... | output_path | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_format_converter.py | test_to_hf_dataset | assert_* | variable | 56 | import json
import os
import tempfile
from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.utils.format_converter import (
to_alpaca,
to_chatml,
to_fine_tuning,
to_hf_dataset,
to_jsonl,
)
@pytest.mark.unit
def test_to_hf_dataset():
"""Test conversion to Hugging Fac... | output_path) | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
meta-llama/synthetic-data-kit | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | train | train | tests/unit/test_llm_client.py | test_llm_client_initialization | assert | none_literal | 20 | from unittest.mock import MagicMock, patch
import pytest
from synthetic_data_kit.models.llm_client import LLMClient
@pytest.mark.unit
def test_llm_client_initialization(patch_config, test_env):
"""Test LLM client initialization with API endpoint provider."""
with patch("synthetic_data_kit.models.llm_client.O... | None | b269de90aa123fe9edfb70d31c20b76b5907db4d | 1 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.