mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-02 08:44:44 +00:00
update provider to provider_id
This commit is contained in:
parent
4491a51149
commit
00e57d693f
3 changed files with 4 additions and 4 deletions
|
@ -439,8 +439,8 @@ class DatasetsRoutingTable(CommonRoutingTableImpl, Datasets):
|
|||
|
||||
# infer provider from source
|
||||
if metadata:
|
||||
if metadata.get("provider"):
|
||||
provider_id = metadata.get("provider") # pass through from nvidia datasetio
|
||||
if metadata.get("provider_id"):
|
||||
provider_id = metadata.get("provider_id") # pass through from nvidia datasetio
|
||||
elif source.type == DatasetType.rows.value:
|
||||
provider_id = "localfs"
|
||||
elif source.type == DatasetType.uri.value:
|
||||
|
|
|
@ -30,7 +30,7 @@ def test_register_and_unregister(llama_stack_client, provider_id):
|
|||
dataset_id=dataset_id,
|
||||
purpose=purpose,
|
||||
source=source,
|
||||
metadata={"provider": provider_id, "format": "json", "description": "Test dataset description"},
|
||||
metadata={"provider_id": provider_id, "format": "json", "description": "Test dataset description"},
|
||||
)
|
||||
assert dataset.identifier is not None
|
||||
assert dataset.provider_id == provider_id
|
||||
|
|
|
@ -60,7 +60,7 @@ class TestNvidiaDatastore(unittest.TestCase):
|
|||
provider_id="",
|
||||
purpose=DatasetPurpose.post_training_messages,
|
||||
source=URIDataSource(uri="https://example.com/data.jsonl"),
|
||||
metadata={"format": "jsonl", "description": "Test dataset description"},
|
||||
metadata={"provider_id": "nvidia", "format": "jsonl", "description": "Test dataset description"},
|
||||
)
|
||||
|
||||
self.run_async(self.adapter.register_dataset(dataset_def))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue