forked from aficionado/mistk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mistk-transform-api.yaml
355 lines (355 loc) · 11.6 KB
/
mistk-transform-api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
---
swagger: "2.0"
info:
version: "1.0.0"
title: "Model Integration Software ToolKit - Data Transformation"
basePath: "/v1/mistk/transform"
schemes:
- "http"
consumes:
- "application/json"
produces:
- "application/json"
paths:
/transform:
post:
tags:
- "Transform Plugin Endpoint"
summary: "Performs the transforms defined for this plugin"
operationId: "transform"
parameters:
- in: "body"
name: "initParams"
description: "A list of directory paths where input files can be found."
required: true
schema:
$ref: "#/definitions/TransformSpecificationInitParams"
responses:
200:
description: "Executing transforms"
405:
description: "Invalid input"
schema:
$ref: "#/definitions/ServiceError"
500:
description: "Unexpected error"
schema:
$ref: "#/definitions/ServiceError"
x-swagger-router-controller: "mistk.transform.service"
/status:
get:
tags:
- "Transform Plugin Endpoint"
summary: "Retrieves the status of the transform plugin"
operationId: "get_status"
parameters:
- name: "watch"
in: "query"
description: "Watch for changes to the described resources and return them\
\ as a stream of add, update, and remove notifications. Specify resourceVersion.\n"
required: false
type: "boolean"
- name: "resourceVersion"
in: "query"
description: "When specified with a watch call, shows changes that occur after\
\ that particular version of a resource. Defaults to changes from the beginning\
\ of history.\n"
required: false
type: "number"
responses:
200:
description: "The status of the Transform Plugin"
schema:
$ref: "#/definitions/TransformInstanceStatus"
500:
description: "Unexpected error"
schema:
$ref: "#/definitions/ServiceError"
x-swagger-router-controller: "mistk.transform.service"
/shutdown:
post:
tags:
- "Transform Plugin Endpoint"
summary: "Shutdowns the transform plugin and cleans up any resources."
operationId: "terminate"
parameters: []
responses:
200:
description: "Transform Plugin successfully shutdown"
500:
description: "Unexpected error"
schema:
$ref: "#/definitions/ServiceError"
x-swagger-router-controller: "mistk.transform.service"
/apiVersion:
get:
tags:
- "Transform Plugin Endpoint"
summary: "Returns the version of the MISTK API"
description: "Returns the version of the MISTK API"
operationId: "get_api_version"
parameters: []
responses:
200:
description: "The MISTK API Version\n"
schema:
type: "string"
500:
description: "General server runtime exception"
x-swagger-router-controller: "mistk.transform.service"
definitions:
TransformSpecificationInitParams:
type: "object"
required:
- "inputDatasets"
properties:
inputDatasets:
type: "array"
description: "A list of directory paths where input files can be found."
items:
$ref: "#/definitions/MistkDataset"
outputDataset:
description: "A list of directory paths where output files will be saved"
$ref: "#/definitions/MistkDataset"
properties:
type: "object"
description: "A dictionary of key value pairs for transform plugin arguments."
properties: {}
description: "The intialization parameters used by the Transform Specification\
\ when calling its initialize fuction\n"
example:
outputDataset: ""
inputDatasets:
- ""
- ""
properties: "{}"
ServiceError:
type: "object"
required:
- "message"
properties:
code:
type: "integer"
format: "int32"
message:
type: "string"
description: "An custom error class used by component services"
TransformInstanceStatus:
type: "object"
required:
- "objectInfo"
properties:
objectInfo:
$ref: "#/definitions/ObjectInfo"
state:
type: "string"
description: "The current state of the transform instance"
enum:
- "started"
- "initializing"
- "initialized"
- "failed"
- "ready"
- "transforming"
- "completed"
payload:
type: "object"
description: "Additional arbitrary information relevant to the current state.\
\ \n"
properties: {}
description: "A transform instance status object represents the state of a running\
\ transform instance. \n"
example:
payload: "{}"
state: "started"
objectInfo:
summary: "summary"
owner: "owner"
creationTime: "2000-01-23T04:56:07.000+00:00"
kind: "kind"
displayName: "displayName"
resourceVersion: 0
description: "description"
project: "project"
resources:
- "resources"
- "resources"
labels: "{}"
public: true
modificationTime: "2000-01-23T04:56:07.000+00:00"
name: "name"
id: "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
ObjectInfo:
type: "object"
properties:
kind:
type: "string"
description: "This is the type of the resource (e.g., Model, Dataset). The\
\ field is primarily used when returning watch events, where the type of\
\ the field will be unknown. When submitting resources, this field will\
\ often simply be inferred from the context of the submission.\n"
id:
type: "string"
format: "uuid"
description: "The unique identifier of the object. This will be generated\
\ automatically.\n"
name:
type: "string"
description: "The unique name of the object. Names of SML resources should\
\ be up to maximum length of 253 characters and consist of lower case alphanumeric\
\ characters, -, and .\n"
displayName:
type: "string"
description: "The name of this resoure, as presented via this UI. This field\
\ can have spaces and upper and lower case alphanumeric characters as well\
\ as spaces.\n"
description:
type: "string"
description: "A documentation description of the resource. This string can\
\ be in Markdown form.\n"
summary:
type: "string"
description: "A short description of this object\n"
owner:
type: "string"
description: "The owner/creator of this object.\n"
project:
type: "string"
description: "The project for this object (assuming the resource is project-scoped)\n"
public:
type: "boolean"
description: "Boolean flag indicating whether this resource will be accessible\
\ to members outside of the project\n"
labels:
type: "object"
description: "Key-value pairs of annotations associate with the object.\n"
properties: {}
resources:
type: "array"
description: "An array of resources/reference URIs\n"
items:
type: "string"
resourceVersion:
type: "integer"
description: "This is the server-managed version for the object. It is used\
\ to support monitoring of resources. This should not be set by the client\
\ (and will likely be ignored if it is)\n"
creationTime:
type: "string"
format: "date-time"
description: "The date time at which this object was initially created. This\
\ will be auto generated by the underlying database. Any user input for\
\ this field will be ignored. This will be in the isoformat of 'YYYY-MM-DDTHH:MM:SS.ffffff'\n"
modificationTime:
type: "string"
format: "date-time"
description: "The date time at which this object was last modified. This will\
\ be auto generated by the underlying database. Any user input for this\
\ field will be ignored. This will be in the isoformat of 'YYYY-MM-DDTHH:MM:SS.ffffff'\n"
description: "This is the set of fields common to all objects."
example:
summary: "summary"
owner: "owner"
creationTime: "2000-01-23T04:56:07.000+00:00"
kind: "kind"
displayName: "displayName"
resourceVersion: 0
description: "description"
project: "project"
resources:
- "resources"
- "resources"
labels: "{}"
public: true
modificationTime: "2000-01-23T04:56:07.000+00:00"
name: "name"
id: "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
MistkDataset:
allOf:
- $ref: "#/definitions/Dataset"
- type: "object"
properties:
dataPath:
type: "string"
Dataset:
type: "object"
required:
- "objectInfo"
properties:
objectInfo:
$ref: "#/definitions/ObjectInfo"
datastashId:
type: "string"
description: "The id of the datastash associated with this dataset where all\
\ of its files will be stored.\n"
datastashSubDir:
type: "string"
description: "This field denotes the sub path within the datastash where this\
\ dataset's data resides.\n"
modality:
type: "string"
description: "The type of the data, one of image, audio, video, text. This\
\ does not specify the format of the data.\n"
enum:
- "image"
- "audio"
- "video"
- "text"
- "prediction"
- "evaluation"
- "metrics"
format:
type: "string"
description: "A string representing the name of the format of the dataset.\
\ This should be sufficient to ensure that models and transforms\n are able\
\ to read and parse the data.\n"
statistics:
$ref: "#/definitions/DatasetStatistics"
defaultGroundTruthSetReference:
description: "A reference to the default ground truth set that is associated\
\ with this dataset\n \n"
$ref: "#/definitions/ObjectReference"
description: "Defines the location within the data lake where a dataset can be\
\ found. It is linked to a DatasetClass\n"
x-sml-resource: "Dataset"
x-smlclient-verbs:
- "create"
- "read"
- "update"
- "delete"
- "list"
- "export"
x-sml-scope: "project"
DatasetStatistics:
type: "object"
properties:
size:
type: "integer"
format: "int32"
description: "The size (in bytes) of the dataset"
default: 0
ObjectReference:
type: "object"
properties:
kind:
type: "string"
description: "The type of the object being referenced. This is often optional\
\ as it will be inferrred by the context.\n"
project:
type: "string"
description: "The project (namespace) of this object.\n"
id:
type: "string"
format: "uuid"
description: "The unique identifier of the object."
name:
type: "string"
description: "The unique name of the object."
instance:
type: "object"
description: "Optionally, the object reference can contain the complete object.\
\ This is useful for unit testing where you don't want to go out to the\
\ SRM to obtain the referenced object.\n"
properties: {}
description: "A reference to another declared object. At least one of id or name\
\ fields must be specified.\n"