Skip to content
Snippets Groups Projects
Commit c3a94aa5 authored by Stefano Borini's avatar Stefano Borini
Browse files

Adds a bit more logging to input and output values for the data sources.

(cherry picked from commit 4642c2bc)
parent 1acbe751
No related branches found
No related tags found
1 merge request!156Added logging for data source input and output.
This commit is part of merge request !156. Comments created here will be created in the context of that merge request.
......@@ -133,6 +133,9 @@ def _compute_layer_results(environment_data_values,
# execute data source, passing only relevant data values.
log.info("Evaluating for Data Source {}".format(
factory.name))
log.info("Passed values:")
for idx, dv in enumerate(passed_data_values):
log.info("{}: {}".format(idx, dv))
try:
res = data_source.run(model, passed_data_values)
......@@ -176,7 +179,12 @@ def _compute_layer_results(environment_data_values,
# If the name was not specified, simply discard the value,
# because apparently the user is not interested in it.
results.extend([r for r in res if r.name != ""])
res = [r for r in res if r.name != ""]
results.extend(res)
log.info("Returned values:")
for idx, dv in enumerate(res):
log.info("{}: {}".format(idx, dv))
# Finally, return all the computed data values from all evaluators,
# properly named.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment