Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions optimizerapi/openapi/specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@ components:
extras:
description: A plain JSON object that can contain arbitrary values
type: object
properties:
objectivePars:
type: string
enum:
- result
- expected_minimum
data:
type: array
items:
Expand Down
5 changes: 4 additions & 1 deletion optimizerapi/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ def process_result(result, optimizer, dimensions, cfg, extras, data, space):
# as "None" at the moment.
graph_format = extras.get("graphFormat", "png")

objective_pars = extras.get("objectivePars", "result")

# In the following section details that should be reported to
# clients should go into the "resultDetails" dictionary and plots
# go into the "plots" list (this is handled by calling the "addPlot" function)
Expand All @@ -206,7 +208,8 @@ def process_result(result, optimizer, dimensions, cfg, extras, data, space):

plot_objective(model, dimensions=dimensions,
usepartialdependence=False,
show_confidence=True)
show_confidence=True,
pars=objective_pars)
add_plot(plots, f"objective_{idx}")

if optimizer.n_objectives == 1:
Expand Down