Get Dataset#
Retrieve a dataset object from NeMo Entity Store.
Prerequisites#
Before you can get an existing dataset, make sure that you have:
The namespace and dataset name for the dataset you want to retrieve.
To Get a Dataset#
Choose one of the following options of getting a dataset.
Set up a NeMoMicroservices
client instance using the base URL of the NeMo Entity Store microservice and perform the task as follows.
from nemo_microservices import NeMoMicroservices
client = NeMoMicroservices(
base_url=os.environ["ENTITY_STORE_BASE_URL"]
)
response = client.datasets.retrieve(
namespace="your-namespace", # Namespace that you create using NeMo Entity Store
dataset_name="your-dataset-name",
)
print(response)
Make a GET request to the /v1/datasets/{namespace}/{dataset_name}
endpoint.
export ENTITY_STORE_BASE_URL=<URL for NeMo Entity Store>
curl -X GET "${ENTITY_STORE_BASE_URL}/v1/datasets/${NAMESPACE}/${DATASET_NAME}" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' | jq
Example Response
{
"schema_version": "1.0",
"id": "dataset-81RSQp7FKX3rdBtKvF9Skn",
"description": "your-dataset-description",
"type_prefix": null,
"namespace": "your-namespace",
"project": "string",
"created_at": "2025-02-14T20:47:20.798490",
"updated_at": "2025-02-14T20:47:20.798492",
"custom_fields": {},
"ownership": {
"created_by": "your-email",
"access_policies": {}
},
"name": "your-dataset-name",
"version_id": "main",
"version_tags": [],
"format": "json",
"files_url": "file://your-dataset-name.json/"
}