feat(dataset api): (1.5/n) fix dataset registeration (#1659)

# What does this PR do?

- fix dataset registeration & iterrows
> NOTE: the URL endpoint is changed to datasetio due to flaky path
routing

[//]: # (If resolving an issue, uncomment and update the line below)
[//]: # (Closes #[issue-number])

## Test Plan
```
LLAMA_STACK_CONFIG=fireworks pytest -v tests/integration/datasets/test_datasets.py
```
<img width="854" alt="image"
src="https://github.com/user-attachments/assets/0168b352-1c5a-48d1-8e9a-93141d418e54"
/>


[//]: # (## Documentation)
This commit is contained in:
Xi Yan 2025-03-15 16:48:09 -07:00 committed by GitHub
parent 2c9d624910
commit a568bf3f9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 159 additions and 248 deletions

View file

@ -40,7 +40,7 @@
}
],
"paths": {
"/v1/datasets/{dataset_id}/append-rows": {
"/v1/datasetio/append-rows/{dataset_id}": {
"post": {
"responses": {
"200": {
@ -60,7 +60,7 @@
}
},
"tags": [
"Datasets"
"DatasetIO"
],
"description": "",
"parameters": [
@ -2177,7 +2177,7 @@
}
}
},
"/v1/datasets/{dataset_id}/iterrows": {
"/v1/datasetio/iterrows/{dataset_id}": {
"get": {
"responses": {
"200": {
@ -2204,7 +2204,7 @@
}
},
"tags": [
"Datasets"
"DatasetIO"
],
"description": "Get a paginated list of rows from a dataset. Uses cursor-based pagination.",
"parameters": [
@ -10274,7 +10274,7 @@
"name": "Benchmarks"
},
{
"name": "Datasets"
"name": "DatasetIO"
},
{
"name": "Datasets"
@ -10342,7 +10342,7 @@
"Agents",
"BatchInference (Coming Soon)",
"Benchmarks",
"Datasets",
"DatasetIO",
"Datasets",
"Eval",
"Files",

View file

@ -10,7 +10,7 @@ info:
servers:
- url: http://any-hosted-llama-stack.com
paths:
/v1/datasets/{dataset_id}/append-rows:
/v1/datasetio/append-rows/{dataset_id}:
post:
responses:
'200':
@ -26,7 +26,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- Datasets
- DatasetIO
description: ''
parameters:
- name: dataset_id
@ -1457,7 +1457,7 @@ paths:
schema:
$ref: '#/components/schemas/InvokeToolRequest'
required: true
/v1/datasets/{dataset_id}/iterrows:
/v1/datasetio/iterrows/{dataset_id}:
get:
responses:
'200':
@ -1477,7 +1477,7 @@ paths:
default:
$ref: '#/components/responses/DefaultError'
tags:
- Datasets
- DatasetIO
description: >-
Get a paginated list of rows from a dataset. Uses cursor-based pagination.
parameters:
@ -6931,7 +6931,7 @@ tags:
Agents API for creating and interacting with agentic systems.
- name: BatchInference (Coming Soon)
- name: Benchmarks
- name: Datasets
- name: DatasetIO
- name: Datasets
- name: Eval
x-displayName: >-
@ -6971,7 +6971,7 @@ x-tagGroups:
- Agents
- BatchInference (Coming Soon)
- Benchmarks
- Datasets
- DatasetIO
- Datasets
- Eval
- Files

View file

@ -552,8 +552,8 @@ class Generator:
print(op.defining_class.__name__)
# TODO (xiyan): temporary fix for datasetio inner impl + datasets api
if op.defining_class.__name__ in ["DatasetIO"]:
op.defining_class.__name__ = "Datasets"
# if op.defining_class.__name__ in ["DatasetIO"]:
# op.defining_class.__name__ = "Datasets"
doc_string = parse_type(op.func_ref)
doc_params = dict(