fix: dataset metadata without provider_id (#2527)

# What does this PR do?
Fixes an error when inferring dataset provider_id with metadata

Closes #[2506](https://github.com/meta-llama/llama-stack/issues/2506)

Signed-off-by: Juanma Barea <juanmabareamartinez@gmail.com>
This commit is contained in:
Juanma 2025-06-27 14:51:29 +02:00 committed by GitHub
parent 40fdce79b3
commit e7eb9f9adc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -57,9 +57,8 @@ class DatasetsRoutingTable(CommonRoutingTableImpl, Datasets):
provider_dataset_id = dataset_id provider_dataset_id = dataset_id
# infer provider from source # infer provider from source
if metadata: if metadata and metadata.get("provider_id"):
if metadata.get("provider_id"): provider_id = metadata.get("provider_id") # pass through from nvidia datasetio
provider_id = metadata.get("provider_id") # pass through from nvidia datasetio
elif source.type == DatasetType.rows.value: elif source.type == DatasetType.rows.value:
provider_id = "localfs" provider_id = "localfs"
elif source.type == DatasetType.uri.value: elif source.type == DatasetType.uri.value: