From f1ea058a276afc0b957a5ffc0a149c6265785e1c Mon Sep 17 00:00:00 2001 From: Jakob Langdal Date: Thu, 17 Jun 2021 12:08:24 +0200 Subject: [PATCH] Add extras to result --- optimizerapi/openapi/specification.yml | 4 +++- optimizerapi/optimizer.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/optimizerapi/openapi/specification.yml b/optimizerapi/openapi/specification.yml index b5b5077..c2bcf02 100644 --- a/optimizerapi/openapi/specification.yml +++ b/optimizerapi/openapi/specification.yml @@ -104,4 +104,6 @@ components: next: type: array items: - type: number \ No newline at end of file + type: number + extras: + type: object \ No newline at end of file diff --git a/optimizerapi/optimizer.py b/optimizerapi/optimizer.py index f82ab36..e938f0a 100644 --- a/optimizerapi/optimizer.py +++ b/optimizerapi/optimizer.py @@ -85,7 +85,8 @@ def processResult(result, optimizer, dimensions, cfg, data, space): resultDetails = { "next": [], "pickled": "", - "expected_minimum": [] + "expected_minimum": [], + "extras": {} } plots = [] response = { @@ -120,6 +121,7 @@ def processResult(result, optimizer, dimensions, cfg, data, space): addPlot(plots, "objective") resultDetails["pickled"] = securepickle.pickleToString(result, securepickle.get_crypto()) + # print(str(response)) return response