Skip to content

[PLT-1485] Removed Datatypes #1830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 41 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0bbd7c2
Vb/fix ontology leaks plt 1379 (#1814)
vbrodsky Sep 17, 2024
51ecfea
[PTDT-2553] Added integration tests for MMC MAL/GT imports
real-mjozwiak Sep 9, 2024
8d078c8
[PTDT-2553] Added integration tests for MMC MAL/GT imports (#1795)
real-mjozwiak Sep 17, 2024
24e0766
SDK release v.5.0.0 prep (#1823)
vbrodsky Sep 17, 2024
2faf9a1
Vb/merge 5.0.0 (#1826)
vbrodsky Sep 18, 2024
2c0c677
Revert "Vb/merge 5.0.0 (#1826)" (#1827)
vbrodsky Sep 18, 2024
c089215
Removed data types besides generic data row data
Gabefire Sep 18, 2024
30819db
[PLT-1463] Removed ND deserialize from some unit test part 1 (#1804)
Gabefire Sep 16, 2024
761b1e9
[PLT-1463] Removed ND deserialize from some unit test part 2 (#1815)
Gabefire Sep 16, 2024
379171a
[PLT-1274] Vb/deprecate bulkimportrequest plt 1274 (#1821)
vbrodsky Sep 17, 2024
5e87f4e
[PLT-1463] Remove deserialize completely (#1818)
Gabefire Sep 18, 2024
5fc6ff3
[PLT-1488] Removed coco (#1820)
Gabefire Sep 18, 2024
9cf28a1
Fixed video
Gabefire Sep 18, 2024
7fc10bb
Removed data type test
Gabefire Sep 18, 2024
8051d50
Merge branch 'solve_rebase_v6' into v6
Gabefire Sep 18, 2024
0b810fb
Made fix
Gabefire Sep 19, 2024
f8b8fa3
Fix list of labels
Gabefire Sep 19, 2024
556a5db
Merge branch 'v6' into gu/remove_data_types
Gabefire Sep 19, 2024
aa551e1
Merge branch 'gu/remove_data_types' of github.com:Labelbox/labelbox-p…
Gabefire Sep 19, 2024
2329324
Removed add url
Gabefire Sep 19, 2024
4457f25
Removed rest of tests
Gabefire Sep 19, 2024
f5b6c7d
Fix tests
Gabefire Sep 19, 2024
ce60b24
Finish PR
Gabefire Sep 19, 2024
12aa8c5
Added back in tile data since some of its parameters are required
Gabefire Sep 23, 2024
f124e9d
Merge branch 'v6' of github.com:Labelbox/labelbox-python into v6
Gabefire Sep 23, 2024
b614ced
Removed data types besides generic data row data
Gabefire Sep 18, 2024
e31d118
Fixed video
Gabefire Sep 18, 2024
1a8189a
Removed data type test
Gabefire Sep 18, 2024
62f5fbd
Made fix
Gabefire Sep 19, 2024
6c11e74
Fix list of labels
Gabefire Sep 19, 2024
1ef53cc
Removed add url
Gabefire Sep 19, 2024
159e227
Removed rest of tests
Gabefire Sep 19, 2024
5f625c8
Fix tests
Gabefire Sep 19, 2024
90c1a19
Finish PR
Gabefire Sep 19, 2024
f91a229
Added back in tile data since some of its parameters are required
Gabefire Sep 23, 2024
709ca61
Merge branch 'gu/remove_data_types' of github.com:Labelbox/labelbox-p…
Gabefire Sep 23, 2024
fdabc94
Added tile back to __init__.py
Gabefire Sep 23, 2024
5bb3c97
Fixed import
Gabefire Sep 23, 2024
4888346
Removed some data tests
Gabefire Sep 23, 2024
c32bd71
Removed videoData
Gabefire Sep 23, 2024
e0eb4c3
Remove union
Gabefire Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions libs/labelbox/src/labelbox/data/annotation_types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,8 @@
from .classification import Radio
from .classification import Text

from .data import AudioData
from .data import ConversationData
from .data import DicomData
from .data import DocumentData
from .data import HTMLData
from .data import ImageData
from .data import GenericDataRowData
from .data import MaskData
from .data import TextData
from .data import VideoData
from .data import LlmPromptResponseCreationData
from .data import LlmPromptCreationData
from .data import LlmResponseCreationData

from .label import Label
from .collection import LabelGenerator
Expand Down
41 changes: 0 additions & 41 deletions libs/labelbox/src/labelbox/data/annotation_types/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,47 +40,6 @@ def _assign_ids(label: Label):
self._fns["assign_feature_schema_ids"] = _assign_ids
return self

def add_url_to_data(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this function. This is not supported by GenericDataType and I do not think this is relevant any longer. Check doc string for what it does

self, signer: Callable[[bytes], str]
) -> "LabelGenerator":
"""
Creates signed urls for the data
Only uploads url if one doesn't already exist.

Args:
signer: A function that accepts bytes and returns a signed url.
Returns:
LabelGenerator that signs urls as data is accessed
"""

def _add_url_to_data(label: Label):
label.add_url_to_data(signer)
return label

self._fns["add_url_to_data"] = _add_url_to_data
return self

def add_to_dataset(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same concept of add_url_to_data. This was only used in TextData and GenericDataRow does not support this method

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add it to GenericDataRow but I think methods like this were never used and are complicated

self, dataset: "Entity.Dataset", signer: Callable[[bytes], str]
) -> "LabelGenerator":
"""
Creates data rows from each labels data object and attaches the data to the given dataset.
Updates the label's data object to have the same external_id and uid as the data row.

Args:
dataset: labelbox dataset object to add the new data row to
signer: A function that accepts bytes and returns a signed url.
Returns:
LabelGenerator that updates references to the new data rows as data is accessed
"""

def _add_to_dataset(label: Label):
label.create_data_row(dataset, signer)
return label

self._fns["assign_datarow_ids"] = _add_to_dataset
return self

def add_url_to_masks(
self, signer: Callable[[bytes], str]
) -> "LabelGenerator":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
from .audio import AudioData
from .conversation import ConversationData
from .dicom import DicomData
from .document import DocumentData
from .html import HTMLData
from .raster import ImageData
from .raster import MaskData
from .text import TextData
from .video import VideoData
from .llm_prompt_response_creation import LlmPromptResponseCreationData
from .llm_prompt_creation import LlmPromptCreationData
from .llm_response_creation import LlmResponseCreationData
from .generic_data_row_data import GenericDataRowData

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions libs/labelbox/src/labelbox/data/annotation_types/data/html.py

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
from requests.exceptions import ConnectTimeout
from typing_extensions import Literal

from pydantic import BaseModel, model_validator, ConfigDict

from ..types import TypedArray
from .base_data import BaseData


class RasterData(BaseModel, ABC):
Expand Down Expand Up @@ -222,6 +223,3 @@ class MaskData(RasterData):
url: Optional[str] = None
arr: Optional[TypedArray[Literal['uint8']]] = None
"""


class ImageData(RasterData, BaseData): ...
116 changes: 0 additions & 116 deletions libs/labelbox/src/labelbox/data/annotation_types/data/text.py

This file was deleted.

Loading
Loading