Collection Campaign Scripting
import aquariumlearning as al
import json
# Your issue must have been created under the Rare Scenario issue type
ISSUE_UUID = "..."
# Either the unlabeled dataset that you want to search through
# OR "" if you are querying the results of a Python-client-triggered
# collection campaign
UNLABELED_DATASET_NAME = "..."
OUTPUT_JSON = "..."
collection_client = al.CollectionClient()
collection_client.set_credentials(api_key="YOUR_API_KEY")
results = collection_client.get_unlabeled_results_for_issue(
issue_uuid=ISSUE_UUID,
unlabeled_dataset_name=UNLABELED_DATASET_NAME,
# You can add the option retrigger_search=True to run the search
# for the first time (or rerun)
)
print(f"{len(results)} results found")
with open(OUTPUT_JSON, "w") as f:
json.dump(results, f)
Last updated
Was this helpful?