From e8899dd8095d612f4eadd06fde78b76f44b421ba Mon Sep 17 00:00:00 2001 From: Ruangrin L <88072261+idalr@users.noreply.github.com> Date: Fri, 3 Nov 2023 14:35:28 +0100 Subject: [PATCH] edit per early feedback --- src/{ => pie_datasets}/document/__init__.py | 0 src/{ => pie_datasets}/document/types.py | 0 tests/dataset_builders/pie/test_cdcp.py | 9 ++++----- 3 files changed, 4 insertions(+), 5 deletions(-) rename src/{ => pie_datasets}/document/__init__.py (100%) rename src/{ => pie_datasets}/document/types.py (100%) diff --git a/src/document/__init__.py b/src/pie_datasets/document/__init__.py similarity index 100% rename from src/document/__init__.py rename to src/pie_datasets/document/__init__.py diff --git a/src/document/types.py b/src/pie_datasets/document/types.py similarity index 100% rename from src/document/types.py rename to src/pie_datasets/document/types.py diff --git a/tests/dataset_builders/pie/test_cdcp.py b/tests/dataset_builders/pie/test_cdcp.py index 8749ec60..b48c6ca8 100644 --- a/tests/dataset_builders/pie/test_cdcp.py +++ b/tests/dataset_builders/pie/test_cdcp.py @@ -19,17 +19,16 @@ document_to_example, example_to_document, ) -from src.document.types import TokenDocumentWithLabeledSpansAndBinaryRelations +from pie_datasets.document.types import TokenDocumentWithLabeledSpansAndBinaryRelations from tests import FIXTURES_ROOT -from tests.dataset_builders.common import _deep_compare +from tests.dataset_builders.common import PIE_BASE_PATH, _deep_compare disable_caching() DATASET_NAME = "cdcp" SPLIT_SIZES = {"train": 581, "test": 150} -# HF_DATASET_PATH = "DFKI-SLT/cdcp" HF_DATASET_PATH = CDCP.BASE_DATASET_PATH -PIE_DATASET_PATH = "pie/cdcp" +PIE_DATASET_PATH = PIE_BASE_PATH / DATASET_NAME # "pie/cdcp" DATA_PATH = FIXTURES_ROOT / "dataset_builders" / "cdcp_acl17.zip" HF_EXAMPLE_00195 = { @@ -171,7 +170,7 @@ def test_example_to_document_and_back_all( @pytest.fixture(scope="module") def dataset() -> DatasetDict: - return DatasetDict.load_dataset(PIE_DATASET_PATH) + return DatasetDict.load_dataset(str(PIE_DATASET_PATH)) def test_pie_dataset(dataset):