Skip to content

Commit eb5e85e

Browse files
committed
test fixes + constants
1 parent 3da9879 commit eb5e85e

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

nucleus/constants.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@
9292
MODEL_RUN_ID_KEY = "model_run_id"
9393
NAME_KEY = "name"
9494
NEW_ITEMS = "new_items"
95-
# NUCLEUS_ENDPOINT = "https://api.scale.com/v1/nucleus"
96-
NUCLEUS_ENDPOINT = "https://jihan-yin-api.devbox.internal.scale.com/v1/nucleus"
95+
NUCLEUS_ENDPOINT = "https://api.scale.com/v1/nucleus"
9796
NUM_SENSORS_KEY = "num_sensors"
9897
ORIGINAL_IMAGE_URL_KEY = "original_image_url"
9998
PAGE_SIZE = "pageSize"

tests/test_dataset.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -562,17 +562,22 @@ def test_dataset_item_iterator(dataset):
562562
def test_dataset_get_image_indexing_status(CLIENT):
563563
dataset = Dataset(DATASET_WITH_EMBEDDINGS, CLIENT)
564564
resp = dataset.get_image_indexing_status()
565-
assert resp["embedding_count"]
566-
assert resp["image_count"]
567-
assert not resp["object_count"]
568-
assert resp["percent_indexed"]
565+
print(resp)
566+
assert resp["embedding_count"] == 170
567+
assert resp["image_count"] == 170
568+
assert "object_count" not in resp
569+
assert round(resp["percent_indexed"], 2) == round(
570+
resp["image_count"] / resp["embedding_count"], 2
571+
)
569572

570573

571574
@pytest.mark.integration
572575
def test_dataset_get_object_indexing_status(CLIENT):
573576
dataset = Dataset(DATASET_WITH_EMBEDDINGS, CLIENT)
574577
resp = dataset.get_object_indexing_status()
575-
assert resp["embedding_count"]
576-
assert resp["object_count"]
577-
assert not resp["image_count"]
578-
assert resp["percent_indexed"]
578+
assert resp["embedding_count"] == 422
579+
assert resp["object_count"] == 423
580+
assert "image_count" not in resp
581+
assert round(resp["percent_indexed"], 2) == round(
582+
resp["object_count"] / resp["embedding_count"], 2
583+
)

0 commit comments

Comments
 (0)