diff --git a/labelbox/schema/batch.py b/labelbox/schema/batch.py index f14ea55d2..c7ba1105f 100644 --- a/labelbox/schema/batch.py +++ b/labelbox/schema/batch.py @@ -9,6 +9,7 @@ import requests import logging import time +import warnings if TYPE_CHECKING: from labelbox import Project @@ -103,6 +104,9 @@ def export_data_rows(self, Raises: LabelboxError: if the export fails or is unable to download within the specified time. """ + warnings.warn( + "You are currently utilizing exports v1 for this action, which will be deprecated after December 31st, 2023. We recommend transitioning to exports v2. Find out more at this link: https://docs.labelbox.com/reference/label-export." + ) id_param = "batchId" metadata_param = "includeMetadataInput" query_str = """mutation GetBatchDataRowsExportUrlPyApi($%s: ID!, $%s: Boolean!) diff --git a/labelbox/schema/dataset.py b/labelbox/schema/dataset.py index 01bc352b1..bfe7e02c3 100644 --- a/labelbox/schema/dataset.py +++ b/labelbox/schema/dataset.py @@ -5,6 +5,7 @@ from collections.abc import Iterable from string import Template import time +import warnings from labelbox import parser from itertools import islice @@ -565,6 +566,9 @@ def export_data_rows(self, Raises: LabelboxError: if the export fails or is unable to download within the specified time. """ + warnings.warn( + "You are currently utilizing exports v1 for this action, which will be deprecated after December 31st, 2023. We recommend transitioning to exports v2. Find out more at this link: https://docs.labelbox.com/reference/label-export." + ) id_param = "datasetId" metadata_param = "includeMetadataInput" query_str = """mutation GetDatasetDataRowsExportUrlPyApi($%s: ID!, $%s: Boolean!) diff --git a/labelbox/schema/model_run.py b/labelbox/schema/model_run.py index 530077110..7ced8c8f0 100644 --- a/labelbox/schema/model_run.py +++ b/labelbox/schema/model_run.py @@ -5,6 +5,7 @@ import time import logging import requests +import warnings from labelbox import parser from enum import Enum @@ -470,6 +471,9 @@ def export_labels( If the server didn't generate during the `timeout_seconds` period, None is returned. """ + warnings.warn( + "You are currently utilizing exports v1 for this action, which will be deprecated after December 31st, 2023. We recommend transitioning to exports v2. Find out more at this link: https://docs.labelbox.com/reference/label-export." + ) sleep_time = 2 query_str = """mutation exportModelRunAnnotationsPyApi($modelRunId: ID!) { exportModelRunAnnotations(data: {modelRunId: $modelRunId}) { diff --git a/labelbox/schema/project.py b/labelbox/schema/project.py index f3bc339c0..f76ff1024 100644 --- a/labelbox/schema/project.py +++ b/labelbox/schema/project.py @@ -1,6 +1,7 @@ import json import logging import time +import warnings from collections import namedtuple from datetime import datetime, timezone from pathlib import Path @@ -231,6 +232,9 @@ def export_queued_data_rows( Raises: LabelboxError: if the export fails or is unable to download within the specified time. """ + warnings.warn( + "You are currently utilizing exports v1 for this action, which will be deprecated after December 31st, 2023. We recommend transitioning to exports v2. Find out more at this link: https://docs.labelbox.com/reference/label-export." + ) id_param = "projectId" metadata_param = "includeMetadataInput" query_str = """mutation GetQueuedDataRowsExportUrlPyApi($%s: ID!, $%s: Boolean!) @@ -334,6 +338,9 @@ def export_labels(self, URL of the data file with this Project's labels. If the server didn't generate during the `timeout_seconds` period, None is returned. """ + warnings.warn( + "You are currently utilizing exports v1 for this action, which will be deprecated after December 31st, 2023. We recommend transitioning to exports v2. Find out more at this link: https://docs.labelbox.com/reference/label-export." + ) def _string_from_dict(dictionary: dict, value_with_quotes=False) -> str: """Returns a concatenated string of the dictionary's keys and values