Skip to content

Commit

Permalink
fixed a minor issue with multiobj
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikOrm committed Nov 23, 2023
1 parent d301321 commit 6cff9df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hypermapper/param/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def run_configurations(
configurations, settings["output_data_file"]
)

if any(torch.isnan(data_array.metrics_array)) or any(
if torch.any(torch.isnan(data_array.metrics_array)) or torch.any(
torch.isnan(data_array.metrics_array)
):
raise Exception("NaN values in output from blackbox function. Exiting.")
Expand All @@ -602,7 +602,6 @@ def run_configurations_client_server(
- output_data_file: path to the output file.
"""
print("Communication protocol: sending message...")

# Write to stdout
sys.stdout.write_protocol(
"Request %d\n" % len(configurations)
Expand Down Expand Up @@ -699,12 +698,13 @@ def run_configurations_with_black_box_function(
idx = 0
while idx < len(original_configurations):
configurations_to_run = original_configurations[
idx : idx + self.settings["batch_size"]
idx: idx + self.settings["batch_size"]
]
bbf_arguments = [
{name: value for name, value in zip(self.parameter_names, config)}
for config in configurations_to_run
]

if self.settings["batch_size"] > 1:
outputs = black_box_function(bbf_arguments)
else:
Expand Down

0 comments on commit 6cff9df

Please sign in to comment.