Skip to content

Commit

Permalink
Add pareto to default list
Browse files Browse the repository at this point in the history
  • Loading branch information
langdal committed Jun 27, 2023
1 parent e9172b3 commit 9f35c36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions optimizerapi/openapi/specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ components:
type: number
graphs:
type: array
default: ["objective", "convergence", "pareto"]
items:
type: string
additionalProperties:
Expand Down
4 changes: 2 additions & 2 deletions optimizerapi/optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def process_result(result, optimizer, dimensions, cfg, extras, data, space):
# as "None" at the moment.
graph_format = extras.get("graphFormat", "png")
max_quality = int(extras.get("maxQuality", "5"))
graphs_to_return = extras.get("graphs", ['objective', 'convergence'])
graphs_to_return = extras.get("graphs", ['objective', 'convergence', 'pareto'])

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

Expand Down Expand Up @@ -280,7 +280,7 @@ def process_result(result, optimizer, dimensions, cfg, extras, data, space):
round_to_length_scales(minimum[0], optimizer.space),
minimum[1],
]
else:
elif 'pareto' in graphs_to_return:
plot_Pareto(optimizer)
add_plot(plots, "pareto")

Expand Down

0 comments on commit 9f35c36

Please sign in to comment.