You can retrieve a dataset along with its annotations by setting the include_dataset_annotations parameter to True.
Copy
Ask AI
# Get a dataset with annotationstry: # Using dataset ID dataset = Dataset.get_dataset_by_id(dataset_id=DATASET_ID, include_dataset_annotations=True) # Or using dataset name # dataset = Dataset.get_dataset_by_name(name="test_dataset", include_dataset_annotations=True)except Exception as e: print(f"Failed to get dataset: {e}")