Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add learning parameter API changes #85

Merged
merged 2 commits into from
Dec 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 64 additions & 1 deletion spiceaidocs/static/openapi/spiceai.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: "3.0.3"
info:
description: ""
version: "0.3.1-alpha"
version: "0.4.1-alpha"
title: "Spice.ai"
servers:
- url: http://localhost:8000/api/v0.1
Expand Down Expand Up @@ -81,6 +81,21 @@ paths:
required: true
schema:
type: "string"
requestBody:
description: "The configurable parameters for a training run"
required: false
content:
application/json:
schema:
$ref: "#/components/schemas/TrainRequest"
examples:
dql-example:
summary: Start a training run with 5 episodes and the DQL learning agent
value: |
{
"learning_algorithm": "dql",
"number_episodes": 5
}
responses:
"200":
description: "Pod started training"
Expand Down Expand Up @@ -736,6 +751,33 @@ paths:
}
"404":
description: "Pod not found"
/algorithms:
get:
tags:
- "train"
responses:
"200":
description: Returns a list of the available ML learning algorithms.
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/LearningAlgorithm"
example:
[
{
"algorithm_id": "dql",
"name": "Deep Q-Learning",
"docs_link": "https://docs.spiceai.org/deep-learning-ai/dql/",
},
{
"algorithm_id": "vpg",
"name": "Vanilla Policy Gradient",
"docs_link": "https://docs.spiceai.org/deep-learning-ai/vpg/",
},
]

components:
schemas:
Pod:
Expand Down Expand Up @@ -828,6 +870,27 @@ components:
archive_path:
type: "string"
description: "Path to the .spicepod archive to import"
TrainRequest:
type: "object"
properties:
learning_algorithm:
type: "string"
description: "The learning algorithm id to use in the requested training run"
number_episodes:
type: "integer"
format: "int64"
LearningAlgorithm:
type: "object"
properties:
algorithm_id:
type: "string"
description: "The AI learning algorithm identifier"
name:
type: "string"
description: "The AI learning algorithm name. i.e. Deep Q-Learning"
docs_link:
type: "string"
description: "Link to Spice.ai docs where you can learn more about the algorithm"
TrainingRun:
type: "object"
properties:
Expand Down