44
55from nucleus .dataset import Dataset
66from nucleus .errors import NucleusAPIError
7- from tests .helpers import DATASET_WITH_AUTOTAG , running_as_nucleus_pytest_user
7+ from tests .helpers import (
8+ DATASET_WITH_EMBEDDINGS ,
9+ running_as_nucleus_pytest_user ,
10+ )
811
912# TODO: Test delete_autotag once API support for autotag creation is added.
1013
1114
1215@pytest .mark .integration
1316def test_update_autotag (CLIENT ):
1417 if running_as_nucleus_pytest_user (CLIENT ):
15- job = Dataset (DATASET_WITH_AUTOTAG , CLIENT ).update_autotag (
18+ job = Dataset (DATASET_WITH_EMBEDDINGS , CLIENT ).update_autotag (
1619 "tag_c8jwr0rpy1w00e134an0"
1720 )
1821 job .sleep_until_complete ()
@@ -24,12 +27,12 @@ def test_dataset_export_autotag_training_items(CLIENT):
2427 # This test can only run for the test user who has an indexed dataset.
2528 # TODO: if/when we can create autotags via api, create one instead.
2629 if running_as_nucleus_pytest_user (CLIENT ):
27- dataset = CLIENT .get_dataset (DATASET_WITH_AUTOTAG )
30+ dataset = CLIENT .get_dataset (DATASET_WITH_EMBEDDINGS )
2831
2932 with pytest .raises (NucleusAPIError ) as api_error :
3033 dataset .autotag_training_items (autotag_name = "NONSENSE_GARBAGE" )
3134 assert (
32- f"The autotag NONSENSE_GARBAGE was not found in dataset { DATASET_WITH_AUTOTAG } "
35+ f"The autotag NONSENSE_GARBAGE was not found in dataset { DATASET_WITH_EMBEDDINGS } "
3336 in str (api_error .value )
3437 )
3538
@@ -52,7 +55,9 @@ def test_dataset_export_autotag_training_items(CLIENT):
5255
5356def test_export_embeddings (CLIENT ):
5457 if running_as_nucleus_pytest_user (CLIENT ):
55- embeddings = Dataset (DATASET_WITH_AUTOTAG , CLIENT ).export_embeddings ()
58+ embeddings = Dataset (
59+ DATASET_WITH_EMBEDDINGS , CLIENT
60+ ).export_embeddings ()
5661 assert "embedding_vector" in embeddings [0 ]
5762 assert "reference_id" in embeddings [0 ]
5863
@@ -61,12 +66,12 @@ def test_dataset_export_autotag_tagged_items(CLIENT):
6166 # This test can only run for the test user who has an indexed dataset.
6267 # TODO: if/when we can create autotags via api, create one instead.
6368 if running_as_nucleus_pytest_user (CLIENT ):
64- dataset = CLIENT .get_dataset (DATASET_WITH_AUTOTAG )
69+ dataset = CLIENT .get_dataset (DATASET_WITH_EMBEDDINGS )
6570
6671 with pytest .raises (NucleusAPIError ) as api_error :
6772 dataset .autotag_items (autotag_name = "NONSENSE_GARBAGE" )
6873 assert (
69- f"The autotag NONSENSE_GARBAGE was not found in dataset { DATASET_WITH_AUTOTAG } "
74+ f"The autotag NONSENSE_GARBAGE was not found in dataset { DATASET_WITH_EMBEDDINGS } "
7075 in str (api_error .value )
7176 )
7277
0 commit comments