finish multi-app examples
This commit is contained in:
@@ -294,6 +294,7 @@ class DesktopEnv(gym.Env):
|
||||
self.setup_controller.setup(self.evaluator.get("postconfig", []))
|
||||
|
||||
if type(self.metric) == list:
|
||||
results = []
|
||||
for idx, metric in enumerate(self.metric):
|
||||
try:
|
||||
config = self.evaluator["result"][idx]
|
||||
@@ -310,11 +311,12 @@ class DesktopEnv(gym.Env):
|
||||
**self.metric_options[idx]) if expected_state is not None \
|
||||
else metric(result_state, **self.metric_options[idx])
|
||||
|
||||
if self.metric_conj == 'and' and not bool(metric):
|
||||
if self.metric_conj == 'and' and float(metric) == 0.0:
|
||||
return 0
|
||||
elif self.metric_conj == 'or' and bool(metric):
|
||||
elif self.metric_conj == 'or' and float(metric) == 1.0:
|
||||
return 1
|
||||
return 1 if self.metric_conj == 'and' else 0
|
||||
else: results.append(metric)
|
||||
return sum(results) / len(results) if self.metric_conj == 'and' else max(results)
|
||||
else:
|
||||
try:
|
||||
result_state = self.result_getter(self, self.evaluator["result"])
|
||||
|
||||
Reference in New Issue
Block a user