Skip to content

Commit 07d76aa

Browse files
authored
[PLT-0] update test assets (#2055)
1 parent 9dad695 commit 07d76aa

6 files changed

Lines changed: 27 additions & 40 deletions

File tree

libs/labelbox/tests/conftest.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from labelbox.schema.quality_mode import QualityMode
3535

3636
IMG_URL = "https://picsum.photos/200/300.jpg"
37-
MASKABLE_IMG_URL = "https://storage.googleapis.com/labelbox-datasets/image_sample_data/2560px-Kitano_Street_Kobe01s5s4110.jpeg"
3837
SMALL_DATASET_URL = "https://storage.googleapis.com/lb-artifacts-testing-public/sdk_integration_test/potato.jpeg"
3938
DATA_ROW_PROCESSING_WAIT_TIMEOUT_SECONDS = 30
4039
DATA_ROW_PROCESSING_WAIT_SLEEP_INTERNAL_SECONDS = 3
@@ -75,7 +74,7 @@ class Environ(Enum):
7574

7675
@pytest.fixture
7776
def image_url() -> str:
78-
return MASKABLE_IMG_URL
77+
return IMG_URL
7978

8079

8180
@pytest.fixture
@@ -880,8 +879,8 @@ def video_data(client, rand_gen, video_data_row, wait_for_data_row_processing):
880879

881880
def create_video_data_row(rand_gen):
882881
return {
883-
"row_data": "https://storage.googleapis.com/labelbox-datasets/video-sample-data/sample-video-1.mp4",
884-
"global_key": f"https://storage.googleapis.com/labelbox-datasets/video-sample-data/sample-video-1.mp4-{rand_gen(str)}",
882+
"row_data": "https://storage.googleapis.com/lb-test-data/cataflow/media/test_video_500kb.mp4",
883+
"global_key": f"https://storage.googleapis.com/lb-test-data/cataflow/media/test_video_500kb.mp4-{rand_gen(str)}",
885884
"media_type": "VIDEO",
886885
}
887886

libs/labelbox/tests/data/annotation_import/conftest.py

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
def video_data_row_factory():
2727
def video_data_row(global_key):
2828
return {
29-
"row_data": "https://storage.googleapis.com/labelbox-datasets/video-sample-data/sample-video-1.mp4",
30-
"global_key": f"https://storage.googleapis.com/labelbox-datasets/video-sample-data/sample-video-1.mp4-{global_key}",
29+
"row_data": "https://storage.googleapis.com/lb-test-data/cataflow/media/test_video_500kb.mp4",
30+
"global_key": f"https://storage.googleapis.com/lb-test-data/cataflow/media/test_video_500kb.mp4-{global_key}",
3131
"media_type": "VIDEO",
3232
}
3333

@@ -38,8 +38,8 @@ def video_data_row(global_key):
3838
def audio_data_row_factory():
3939
def audio_data_row(global_key):
4040
return {
41-
"row_data": "https://storage.googleapis.com/labelbox-datasets/audio-sample-data/sample-audio-1.mp3",
42-
"global_key": f"https://storage.googleapis.com/labelbox-datasets/audio-sample-data/sample-audio-1.mp3-{global_key}",
41+
"row_data": "https://storage.googleapis.com/lb-test-data/cataflow/media/tomorrow-114848.mp3",
42+
"global_key": f"https://storage.googleapis.com/lb-test-data/cataflow/media/tomorrow-114848.mp3-{global_key}",
4343
"media_type": "AUDIO",
4444
}
4545

@@ -82,8 +82,8 @@ def geospatial_data_row(global_key):
8282
def html_data_row_factory():
8383
def html_data_row(global_key):
8484
return {
85-
"row_data": "https://storage.googleapis.com/labelbox-datasets/html_sample_data/sample_html_1.html",
86-
"global_key": f"https://storage.googleapis.com/labelbox-datasets/html_sample_data/sample_html_1.html-{global_key}",
85+
"row_data": "https://storage.googleapis.com/lb-test-data/cataflow/media/about.html",
86+
"global_key": f"https://storage.googleapis.com/lb-test-data/cataflow/media/about.html-{global_key}",
8787
}
8888

8989
return html_data_row
@@ -106,10 +106,10 @@ def document_data_row_factory():
106106
def document_data_row(global_key):
107107
return {
108108
"row_data": {
109-
"pdf_url": "https://storage.googleapis.com/labelbox-datasets/arxiv-pdf/data/99-word-token-pdfs/0801.3483.pdf",
110-
"text_layer_url": "https://storage.googleapis.com/labelbox-datasets/arxiv-pdf/data/99-word-token-pdfs/0801.3483-lb-textlayer.json",
109+
"pdf_url": "https://storage.googleapis.com/lb-test-data/cataflow/media/test-pdf.pdf",
110+
"text_layer_url": "https://storage.googleapis.com/lb-test-data/cataflow/media/sample-pdf-textlayer.json",
111111
},
112-
"global_key": f"https://storage.googleapis.com/labelbox-datasets/arxiv-pdf/data/99-word-token-pdfs/0801.3483.pdf-{global_key}",
112+
"global_key": f"https://storage.googleapis.com/lb-test-data/cataflow/media/test-pdf.pdf-{global_key}",
113113
"media_type": "PDF",
114114
}
115115

@@ -120,28 +120,17 @@ def document_data_row(global_key):
120120
def text_data_row_factory():
121121
def text_data_row(global_key):
122122
return {
123-
"row_data": "https://storage.googleapis.com/lb-artifacts-testing-public/sdk_integration_test/sample-text-2.txt",
124-
"global_key": f"https://storage.googleapis.com/lb-artifacts-testing-public/sdk_integration_test/sample-text-2.txt-{global_key}",
123+
"row_data": "https://storage.googleapis.com/lb-test-data/cataflow/media/sample-text.txt",
124+
"global_key": f"https://storage.googleapis.com/lb-test-data/cataflow/media/sample-text.txt-{global_key}",
125125
"media_type": "TEXT",
126126
}
127127

128128
return text_data_row
129129

130130

131-
@pytest.fixture(scope="module", autouse=True)
132-
def llm_human_preference_data_row_factory():
133-
def llm_human_preference_data_row(global_key):
134-
return {
135-
"row_data": "https://storage.googleapis.com/labelbox-datasets/sdk_test/llm_prompt_response_conv.json",
136-
"global_key": global_key,
137-
}
138-
139-
return llm_human_preference_data_row
140-
141-
142131
@pytest.fixture(scope="module")
143132
def mmc_data_row_url():
144-
return "https://storage.googleapis.com/labelbox-datasets/conversational_model_evaluation_sample/offline-model-chat-evaluation.json"
133+
return "https://storage.googleapis.com/lb-test-data/cataflow/media/sample-conversational-v2-4.json"
145134

146135

147136
@pytest.fixture(scope="module", autouse=True)
@@ -700,7 +689,7 @@ def llm_prompt_response_creation_dataset_with_data_row(
700689
global_key = str(uuid.uuid4())
701690

702691
convo_data = {
703-
"row_data": "https://storage.googleapis.com/labelbox-datasets/conversational-sample-data/pairwise_shopping_2.json",
692+
"row_data": "https://storage.googleapis.com/lb-test-data/cataflow/media/sample-conversational-v2-4.json",
704693
"global_key": global_key,
705694
}
706695

@@ -1321,7 +1310,7 @@ def segmentation_inference(prediction_id_mapping):
13211310
segmentation.update(
13221311
{
13231312
"mask": {
1324-
"instanceURI": "https://storage.googleapis.com/labelbox-datasets/image_sample_data/raster_seg.png",
1313+
"instanceURI": "https://storage.googleapis.com/lb-test-data/cataflow/media/dog.png",
13251314
"colorRGB": (255, 255, 255),
13261315
}
13271316
}

libs/labelbox/tests/integration/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ def video_data(client, rand_gen, video_data_row, wait_for_data_row_processing):
245245

246246
def create_video_data_row(rand_gen):
247247
return {
248-
"row_data": "https://storage.googleapis.com/labelbox-datasets/video-sample-data/sample-video-1.mp4",
249-
"global_key": f"https://storage.googleapis.com/labelbox-datasets/video-sample-data/sample-video-1.mp4-{rand_gen(str)}",
248+
"row_data": "https://storage.googleapis.com/lb-test-data/cataflow/media/test_video_500kb.mp4",
249+
"global_key": f"https://storage.googleapis.com/lb-test-data/cataflow/media/test_video_500kb.mp4-{rand_gen(str)}",
250250
"media_type": "VIDEO",
251251
}
252252

libs/labelbox/tests/integration/test_data_rows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,8 +689,8 @@ def test_data_row_update(
689689
assert data_row.row_data == image_url
690690

691691
# tileLayer becomes a media attribute
692-
pdf_url = "https://storage.googleapis.com/labelbox-datasets/arxiv-pdf/data/99-word-token-pdfs/0801.3483.pdf"
693-
tileLayerUrl = "https://storage.googleapis.com/labelbox-datasets/arxiv-pdf/data/99-word-token-pdfs/0801.3483-lb-textlayer.json"
692+
pdf_url = "https://storage.googleapis.com/lb-test-data/cataflow/media/test-pdf.pdf"
693+
tileLayerUrl = "https://storage.googleapis.com/lb-test-data/cataflow/media/sample-pdf-textlayer.json"
694694
data_row.update(row_data={"pdfUrl": pdf_url, "tileLayerUrl": tileLayerUrl})
695695

696696
def custom_check(data_row):

libs/labelbox/tests/integration/test_data_rows_upsert.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def all_inclusive_data_row(self, dataset, image_url):
2929
{
3030
"type": "PDF_URL",
3131
"name": "att3",
32-
"value": "https://storage.googleapis.com/labelbox-datasets/arxiv-pdf/data/99-word-token-pdfs/0801.3483.pdf",
32+
"value": "https://storage.googleapis.com/lb-test-data/cataflow/media/test-pdf.pdf",
3333
},
3434
],
3535
)
@@ -63,7 +63,7 @@ def test_create_data_row_with_upsert(self, client, dataset, image_url):
6363
{
6464
"type": AttachmentType.PDF_URL,
6565
"name": "att3",
66-
"value": "https://storage.googleapis.com/labelbox-datasets/arxiv-pdf/data/99-word-token-pdfs/0801.3483.pdf",
66+
"value": "https://storage.googleapis.com/lb-test-data/cataflow/media/test-pdf.pdf",
6767
},
6868
],
6969
"metadata": [
@@ -99,7 +99,7 @@ def test_create_data_row_with_upsert(self, client, dataset, image_url):
9999
assert attachments[2].attachment_type == AttachmentType.PDF_URL
100100
assert (
101101
attachments[2].attachment_value
102-
== "https://storage.googleapis.com/labelbox-datasets/arxiv-pdf/data/99-word-token-pdfs/0801.3483.pdf"
102+
== "https://storage.googleapis.com/lb-test-data/cataflow/media/test-pdf.pdf"
103103
)
104104

105105
assert len(dr.metadata_fields) == 2

libs/lbox-alignerr/tests/conftest.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from labelbox.schema.quality_mode import QualityMode
3535

3636
IMG_URL = "https://picsum.photos/200/300.jpg"
37-
MASKABLE_IMG_URL = "https://storage.googleapis.com/labelbox-datasets/image_sample_data/2560px-Kitano_Street_Kobe01s5s4110.jpeg"
3837
SMALL_DATASET_URL = "https://storage.googleapis.com/lb-artifacts-testing-public/sdk_integration_test/potato.jpeg"
3938
DATA_ROW_PROCESSING_WAIT_TIMEOUT_SECONDS = 30
4039
DATA_ROW_PROCESSING_WAIT_SLEEP_INTERNAL_SECONDS = 3
@@ -72,7 +71,7 @@ class Environ(Enum):
7271

7372
@pytest.fixture
7473
def image_url() -> str:
75-
return MASKABLE_IMG_URL
74+
return IMG_URL
7675

7776

7877
@pytest.fixture
@@ -852,8 +851,8 @@ def video_data(client, rand_gen, video_data_row, wait_for_data_row_processing):
852851

853852
def create_video_data_row(rand_gen):
854853
return {
855-
"row_data": "https://storage.googleapis.com/labelbox-datasets/video-sample-data/sample-video-1.mp4",
856-
"global_key": f"https://storage.googleapis.com/labelbox-datasets/video-sample-data/sample-video-1.mp4-{rand_gen(str)}",
854+
"row_data": "https://storage.googleapis.com/lb-test-data/cataflow/media/test_video_500kb.mp4",
855+
"global_key": f"https://storage.googleapis.com/lb-test-data/cataflow/media/test_video_500kb.mp4-{rand_gen(str)}",
857856
"media_type": "VIDEO",
858857
}
859858

0 commit comments

Comments
 (0)