Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODoE: Error handling when results are None #1159

Merged
merged 2 commits into from
Sep 12, 2023
Merged
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
16 changes: 11 additions & 5 deletions foqus_lib/gui/sdoe/sdoeSetupFrame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2576,11 +2576,17 @@
)
time_list.append(time.time() - t0)
self.resultMessage += "Results for Run #%d:\n" % (nr + 1)
self.resultMessage += "Best Design(s): %s\n" % best_indices
self.resultMessage += "Best %s-Optimality Value: %f\n\n" % (
optCriterion,
best_optval,
)
if best_indices is not None:
self.resultMessage += "Best Design(s): %s\n" % best_indices

Check warning on line 2580 in foqus_lib/gui/sdoe/sdoeSetupFrame.py

View check run for this annotation

Codecov / codecov/patch

foqus_lib/gui/sdoe/sdoeSetupFrame.py#L2580

Added line #L2580 was not covered by tests
else:
self.resultMessage += "Best Design(s): Not Found\n"

Check warning on line 2582 in foqus_lib/gui/sdoe/sdoeSetupFrame.py

View check run for this annotation

Codecov / codecov/patch

foqus_lib/gui/sdoe/sdoeSetupFrame.py#L2582

Added line #L2582 was not covered by tests
if best_optval is not None:
self.resultMessage += "Best %s-Optimality Value: %f\n\n" % (

Check warning on line 2584 in foqus_lib/gui/sdoe/sdoeSetupFrame.py

View check run for this annotation

Codecov / codecov/patch

foqus_lib/gui/sdoe/sdoeSetupFrame.py#L2584

Added line #L2584 was not covered by tests
optCriterion,
best_optval,
)
else:
self.resultMessage += "Best %s-Optimality Value: Not Found\n\n"

Check warning on line 2589 in foqus_lib/gui/sdoe/sdoeSetupFrame.py

View check run for this annotation

Codecov / codecov/patch

foqus_lib/gui/sdoe/sdoeSetupFrame.py#L2589

Added line #L2589 was not covered by tests

# Save results to text file
resultsFile = os.path.join(outdir, "odoe_results.txt")
Expand Down
Loading