|
1 | 1 | openapi: "3.0.3" |
2 | 2 | info: |
3 | 3 | description: "" |
4 | | - version: "0.3.1-alpha" |
| 4 | + version: "0.4.1-alpha" |
5 | 5 | title: "Spice.ai" |
6 | 6 | servers: |
7 | 7 | - url: http://localhost:8000/api/v0.1 |
@@ -81,6 +81,21 @@ paths: |
81 | 81 | required: true |
82 | 82 | schema: |
83 | 83 | type: "string" |
| 84 | + requestBody: |
| 85 | + description: "The configurable parameters for a training run" |
| 86 | + required: false |
| 87 | + content: |
| 88 | + application/json: |
| 89 | + schema: |
| 90 | + $ref: "#/components/schemas/TrainRequest" |
| 91 | + examples: |
| 92 | + dql-example: |
| 93 | + summary: Start a training run with 5 episodes and the DQL learning agent |
| 94 | + value: | |
| 95 | + { |
| 96 | + "learning_algorithm": "dql", |
| 97 | + "number_episodes": 5 |
| 98 | + } |
84 | 99 | responses: |
85 | 100 | "200": |
86 | 101 | description: "Pod started training" |
@@ -736,6 +751,33 @@ paths: |
736 | 751 | } |
737 | 752 | "404": |
738 | 753 | description: "Pod not found" |
| 754 | + /algorithms: |
| 755 | + get: |
| 756 | + tags: |
| 757 | + - "train" |
| 758 | + responses: |
| 759 | + "200": |
| 760 | + description: Returns a list of the available ML learning algorithms. |
| 761 | + content: |
| 762 | + application/json: |
| 763 | + schema: |
| 764 | + type: "array" |
| 765 | + items: |
| 766 | + $ref: "#/components/schemas/LearningAlgorithm" |
| 767 | + example: |
| 768 | + [ |
| 769 | + { |
| 770 | + "algorithm_id": "dql", |
| 771 | + "name": "Deep Q-Learning", |
| 772 | + "docs_link": "https://docs.spiceai.org/deep-learning-ai/dql/", |
| 773 | + }, |
| 774 | + { |
| 775 | + "algorithm_id": "vpg", |
| 776 | + "name": "Vanilla Policy Gradient", |
| 777 | + "docs_link": "https://docs.spiceai.org/deep-learning-ai/vpg/", |
| 778 | + }, |
| 779 | + ] |
| 780 | + |
739 | 781 | components: |
740 | 782 | schemas: |
741 | 783 | Pod: |
@@ -828,6 +870,27 @@ components: |
828 | 870 | archive_path: |
829 | 871 | type: "string" |
830 | 872 | description: "Path to the .spicepod archive to import" |
| 873 | + TrainRequest: |
| 874 | + type: "object" |
| 875 | + properties: |
| 876 | + learning_algorithm: |
| 877 | + type: "string" |
| 878 | + description: "The learning algorithm id to use in the requested training run" |
| 879 | + number_episodes: |
| 880 | + type: "integer" |
| 881 | + format: "int64" |
| 882 | + LearningAlgorithm: |
| 883 | + type: "object" |
| 884 | + properties: |
| 885 | + algorithm_id: |
| 886 | + type: "string" |
| 887 | + description: "The AI learning algorithm identifier" |
| 888 | + name: |
| 889 | + type: "string" |
| 890 | + description: "The AI learning algorithm name. i.e. Deep Q-Learning" |
| 891 | + docs_link: |
| 892 | + type: "string" |
| 893 | + description: "Link to Spice.ai docs where you can learn more about the algorithm" |
831 | 894 | TrainingRun: |
832 | 895 | type: "object" |
833 | 896 | properties: |
|
0 commit comments