Skip to content

Commit c5ed297

Browse files
authored
Merge pull request #233 from togethercomputer/gleb-khaykin/mosh-2087-configure-stainless-shared-models-and-named-enums-for-rl-api
MOSH-2087: Update RL OpenAPI fields to generate better SDKs
2 parents 01ba5d4 + 74e0225 commit c5ed297

1 file changed

Lines changed: 94 additions & 6 deletions

File tree

openapi.yaml

Lines changed: 94 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7707,6 +7707,7 @@ components:
77077707
$ref: '#/components/schemas/RL.EncodedText'
77087708
RL.ListMeta:
77097709
type: object
7710+
description: Pagination metadata for list responses
77107711
properties:
77117712
limit:
77127713
type: integer
@@ -7723,6 +7724,8 @@ components:
77237724
description: Cursor to use as the 'after' parameter for the next page. Empty when has_more is false.
77247725
RL.EncodedText:
77257726
type: object
7727+
required:
7728+
- tokens
77267729
properties:
77277730
tokens:
77287731
description: Pre-tokenized text input
@@ -7732,8 +7735,9 @@ components:
77327735
- 456
77337736
- 789
77347737
items:
7735-
type: string
7736-
format: int64
7738+
oneOf:
7739+
- type: string
7740+
- type: integer
77377741
RL.DType:
77387742
type: string
77397743
enum:
@@ -7812,8 +7816,9 @@ components:
78127816
- 456
78137817
- 789
78147818
items:
7815-
type: string
7816-
format: int64
7819+
oneOf:
7820+
- type: string
7821+
- type: integer
78177822
dtype:
78187823
description: Data type of the integer array
78197824
$ref: '#/components/schemas/RL.DType'
@@ -7832,8 +7837,9 @@ components:
78327837
- 0
78337838
- 1
78347839
items:
7835-
type: string
7836-
format: int64
7840+
oneOf:
7841+
- type: string
7842+
- type: integer
78377843
dtype:
78387844
description: Data type of the integer array (must be D_TYPE_INT64)
78397845
$ref: '#/components/schemas/RL.DType'
@@ -7914,6 +7920,10 @@ components:
79147920
$ref: '#/components/schemas/RL.LossInputs'
79157921
RL.OptimStepOperation:
79167922
type: object
7923+
description: Async optimizer step operation
7924+
required:
7925+
- id
7926+
- status
79177927
properties:
79187928
id:
79197929
type: string
@@ -7924,10 +7934,16 @@ components:
79247934
description: Operation status
79257935
output:
79267936
$ref: '#/components/schemas/RL.OptimStepResult'
7937+
description: Result on success
79277938
error:
79287939
$ref: '#/components/schemas/RL.TrainingOperationError'
7940+
description: Error details on failure
79297941
RL.SampleOperation:
79307942
type: object
7943+
description: Async sample operation
7944+
required:
7945+
- id
7946+
- status
79317947
properties:
79327948
id:
79337949
type: string
@@ -7939,10 +7955,15 @@ components:
79397955
description: Operation status
79407956
output:
79417957
$ref: '#/components/schemas/RL.SampleResult'
7958+
description: Result on success
79427959
error:
79437960
$ref: '#/components/schemas/RL.TrainingOperationError'
7961+
description: Error details on failure
79447962
RL.OptimStepResult:
79457963
type: object
7964+
description: Result of an optimizer step operation
7965+
required:
7966+
- step
79467967
properties:
79477968
step:
79487969
description: Step number
@@ -7951,6 +7972,9 @@ components:
79517972
example: 100
79527973
RL.SampleResult:
79537974
type: object
7975+
description: Result of a sample operation
7976+
required:
7977+
- rollouts
79547978
properties:
79557979
rollouts:
79567980
type: array
@@ -7960,6 +7984,9 @@ components:
79607984
description: Completions grouped by prompt
79617985
RL.SampleRollout:
79627986
type: object
7987+
description: Completions generated for a single prompt
7988+
required:
7989+
- sequences
79637990
properties:
79647991
sequences:
79657992
type: array
@@ -7969,6 +7996,9 @@ components:
79697996
description: Completions generated for one prompt
79707997
RL.SampleSequence:
79717998
type: object
7999+
description: A single generated completion sequence with tokens and logprobs
8000+
required:
8001+
- tokens
79728002
properties:
79738003
tokens:
79748004
type: array
@@ -7996,6 +8026,10 @@ components:
79968026
description: Reason for stopping generation
79978027
RL.ForwardBackwardOperation:
79988028
type: object
8029+
description: Async forward-backward pass operation
8030+
required:
8031+
- id
8032+
- status
79998033
properties:
80008034
id:
80018035
type: string
@@ -8007,10 +8041,15 @@ components:
80078041
description: Operation status
80088042
output:
80098043
$ref: '#/components/schemas/RL.ForwardBackwardResult'
8044+
description: Result on success
80108045
error:
80118046
$ref: '#/components/schemas/RL.TrainingOperationError'
8047+
description: Error details on failure
80128048
RL.ForwardBackwardResult:
80138049
type: object
8050+
description: Result of a forward-backward pass operation
8051+
required:
8052+
- loss
80148053
properties:
80158054
loss:
80168055
type: number
@@ -8028,6 +8067,7 @@ components:
80288067
format: double
80298068
RL.TrainingOperationError:
80308069
type: object
8070+
description: Error details for a failed training operation
80318071
properties:
80328072
code:
80338073
description: Application error code
@@ -8085,6 +8125,17 @@ components:
80858125
- TRAINING_SESSION_STATUS_EXPIRED
80868126
RL.TrainingSession:
80878127
type: object
8128+
description: A training session and its current state
8129+
required:
8130+
- id
8131+
- status
8132+
- base_model
8133+
- inference_checkpoints
8134+
- training_checkpoints
8135+
- step
8136+
- created_at
8137+
- updated_at
8138+
- lora_config
80888139
properties:
80898140
id:
80908141
type: string
@@ -8134,6 +8185,7 @@ components:
81348185
$ref: '#/components/schemas/RL.LoraConfig'
81358186
RL.TrainingSessionsListResponse:
81368187
type: object
8188+
description: Paginated list of training sessions
81378189
properties:
81388190
data:
81398191
type: array
@@ -8196,6 +8248,10 @@ components:
81968248
default: "0.1"
81978249
RL.InferenceCheckpointOperation:
81988250
type: object
8251+
description: Async inference checkpoint operation
8252+
required:
8253+
- id
8254+
- status
81998255
properties:
82008256
id:
82018257
type: string
@@ -8207,10 +8263,15 @@ components:
82078263
description: Operation status
82088264
output:
82098265
$ref: '#/components/schemas/RL.InferenceCheckpointResult'
8266+
description: Result on success
82108267
error:
82118268
$ref: '#/components/schemas/RL.TrainingOperationError'
8269+
description: Error details on failure
82128270
RL.InferenceCheckpointResult:
82138271
type: object
8272+
description: Result of an inference checkpoint operation
8273+
required:
8274+
- model_name
82148275
properties:
82158276
model_name:
82168277
type: string
@@ -8219,6 +8280,10 @@ components:
82198280
RL.InferenceCheckpoint:
82208281
type: object
82218282
description: Saved inference checkpoint
8283+
required:
8284+
- id
8285+
- step
8286+
- created_at
82228287
properties:
82238288
id:
82248289
type: string
@@ -8240,6 +8305,9 @@ components:
82408305
RL.InferenceCheckpointRegistration:
82418306
type: object
82428307
description: Model registration details for an inference checkpoint
8308+
required:
8309+
- model_name
8310+
- registered_at
82438311
properties:
82448312
model_name:
82458313
type: string
@@ -8253,6 +8321,10 @@ components:
82538321
RL.TrainingCheckpoint:
82548322
type: object
82558323
description: Saved training checkpoint
8324+
required:
8325+
- id
8326+
- step
8327+
- created_at
82568328
properties:
82578329
id:
82588330
type: string
@@ -8270,13 +8342,20 @@ components:
82708342
description: Timestamp when the checkpoint was created
82718343
RL.TrainingCheckpointResult:
82728344
type: object
8345+
description: Result of a save training checkpoint operation
8346+
required:
8347+
- checkpoint_id
82738348
properties:
82748349
checkpoint_id:
82758350
type: string
82768351
example: 550e8400-e29b-41d4-a716-446655440000
82778352
description: ID of the saved training checkpoint (use for resume via Start)
82788353
RL.TrainingCheckpointOperation:
82798354
type: object
8355+
description: Async save training checkpoint operation
8356+
required:
8357+
- id
8358+
- status
82808359
properties:
82818360
id:
82828361
type: string
@@ -8288,8 +8367,10 @@ components:
82888367
description: Operation status
82898368
output:
82908369
$ref: '#/components/schemas/RL.TrainingCheckpointResult'
8370+
description: Result on success
82918371
error:
82928372
$ref: '#/components/schemas/RL.TrainingOperationError'
8373+
description: Error details on failure
82938374
RL.CheckpointVariant:
82948375
type: string
82958376
enum:
@@ -8301,6 +8382,10 @@ components:
83018382
RL.CheckpointFile:
83028383
type: object
83038384
description: A downloadable file within a checkpoint
8385+
required:
8386+
- filename
8387+
- url
8388+
- size
83048389
properties:
83058390
filename:
83068391
type: string
@@ -8317,6 +8402,9 @@ components:
83178402
description: File size in bytes
83188403
RL.CheckpointDownloadResponse:
83198404
type: object
8405+
description: Presigned download URLs for a checkpoint's files
8406+
required:
8407+
- data
83208408
properties:
83218409
data:
83228410
type: array

0 commit comments

Comments
 (0)