Skip to content

Commit

Permalink
Add constraints parameter to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
langdal committed Apr 28, 2023
1 parent e06e47f commit 0d56cd0
Showing 1 changed file with 58 additions and 23 deletions.
81 changes: 58 additions & 23 deletions optimizerapi/openapi/specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ paths:
"space":
[
{
"type": "discrete",
"type": "continuous",
"name": "Red",
"from": 0,
"to": 255,
},
{
"type": "discrete",
"type": "continuous",
"name": "Green",
"from": 0,
"to": 255,
Expand All @@ -112,6 +112,14 @@ paths:
"to": 255,
},
],
"constraints":
[
{
"type": "sum",
"dimensions": [0, 1],
"value": 50,
},
],
},
}

Expand Down Expand Up @@ -178,30 +186,57 @@ components:
xi:
type: number
space:
type: array
items:
type: object
properties:
type:
type: string
description: Type of the dimension. Can be category, discrete or continuous
name:
type: string
from:
type: number
to:
type: number
categories:
type: array
items:
type: string
required:
- type
- name

$ref: "#/components/schemas/space"
constraints:
$ref: "#/components/schemas/constraints"
required:
- data
- optimizerConfig
constraints:
type: array
items:
$ref: "#/components/schemas/constraint"
constraint:
type: object
properties:
type:
type: string
enum:
- sum
dimensions:
type: array
items:
type: number
value:
type: number
required:
- dimensions
- value
space:
type: array
items:
type: object
properties:
type:
type: string
description: Type of the dimension. Can be category, discrete or continuous
enum:
- category
- discrete
- continuous
name:
type: string
from:
type: number
to:
type: number
categories:
type: array
items:
type: string
required:
- type
- name
result:
title: Result of running optimizer on experiment
type: object
Expand Down

0 comments on commit 0d56cd0

Please sign in to comment.