Commit 1f6fc3ae authored by André Anjos's avatar André Anjos 💬

Merge branch 'improve_loop_algorithm_crosscheck' into 'master'

Improve loop algorithms crosschecking for experiment

See merge request !91
parents 4f8d705f 5e687062
Pipeline #33408 canceled with stages
in 40 minutes and 28 seconds
......@@ -44,6 +44,7 @@ Validation for experiments
import os
import collections
import itertools
import simplejson as json
from . import utils
......@@ -977,15 +978,21 @@ class Experiment(object):
evaluator_algorithm_name
].groups
groups_count = [
(
len(algo_groups["inputs"]) + len(evaluator_algo_groups["inputs"]),
len(algo_groups["outputs"]) + len(evaluator_algo_groups["outputs"]),
)
for algo_groups, evaluator_algo_groups in zip(
algo_groups_list, evaluator_algo_groups_list
)
]
groups_count = []
for algo_groups, evaluator_algo_groups in itertools.zip_longest(
algo_groups_list, evaluator_algo_groups_list
):
inputs = 0
outputs = 0
if algo_groups:
inputs = len(algo_groups["inputs"])
outputs = len(algo_groups.get("outputs", []))
if evaluator_algo_groups:
inputs += len(evaluator_algo_groups["inputs"])
outputs += len(evaluator_algo_groups.get("outputs", []))
groups_count.append((inputs, outputs))
if collections.Counter(chain_groups_count) != collections.Counter(
groups_count
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment