Skip to content
Snippets Groups Projects
Commit 8ac42d8f authored by David Hendriks's avatar David Hendriks
Browse files

moved some stuff for outputs around

parent 840d77f7
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ Tasks: ...@@ -21,6 +21,7 @@ Tasks:
- TODO: uncomment and implement the HPC functionality - TODO: uncomment and implement the HPC functionality
- TODO: think of a clean and nice way to unload and remove the custom_logging_info library from memory (and from disk) - TODO: think of a clean and nice way to unload and remove the custom_logging_info library from memory (and from disk)
- TODO: think of a nice way to remove the loaded grid_code/ generator from memory. - TODO: think of a nice way to remove the loaded grid_code/ generator from memory.
- TODO: Create a designated dict for results
""" """
import os import os
...@@ -111,6 +112,12 @@ class Population: ...@@ -111,6 +112,12 @@ class Population:
# #
self.process_ID = 0 self.process_ID = 0
# Create location to store results. Users should write to this dictionary.
self.grid_results = {}
# Create location where ensemble results are written to
self.grid_ensemble_results = {}
################################################### ###################################################
# Argument functions # Argument functions
################################################### ###################################################
...@@ -821,10 +828,8 @@ class Population: ...@@ -821,10 +828,8 @@ class Population:
combined_output_dict = merge_dicts(combined_output_dict, output_dict) combined_output_dict = merge_dicts(combined_output_dict, output_dict)
# Put the values back as object properties # Put the values back as object properties
self.grid_options["results"] = combined_output_dict["results"] self.grid_results = combined_output_dict["results"]
self.grid_options["ensemble_results"] = combined_output_dict[ self.grid_ensemble_results = combined_output_dict['ensemble_results'] # Ensemble results are also passed as output from that dictionary
"ensemble_results"
] # Ensemble results are also passed as output from that dictionary
self.grid_options["_failed_count"] = combined_output_dict["_failed_count"] self.grid_options["_failed_count"] = combined_output_dict["_failed_count"]
self.grid_options["_failed_prob"] = combined_output_dict["_failed_prob"] self.grid_options["_failed_prob"] = combined_output_dict["_failed_prob"]
self.grid_options["_failed_systems_error_codes"] = list( self.grid_options["_failed_systems_error_codes"] = list(
...@@ -1040,7 +1045,7 @@ class Population: ...@@ -1040,7 +1045,7 @@ class Population:
# Return a set of results and errors # Return a set of results and errors
output_dict = { output_dict = {
"results": self.grid_options["results"], "results": self.grid_results,
"ensemble_results": ensemble_json, "ensemble_results": ensemble_json,
"_failed_count": self.grid_options["_failed_count"], "_failed_count": self.grid_options["_failed_count"],
"_failed_prob": self.grid_options["_failed_prob"], "_failed_prob": self.grid_options["_failed_prob"],
......
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