Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ipsframework/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -2744,12 +2744,16 @@ def send_ensemble_instance_to_portal(ensemble_name: str, data_path: Path) -> Non
# Let's first "flatten" the hierarchical variables dict into a list
# of lists of dicts, where the top-level of which contains the ensemble
# instance name and associated parameters.
self.debug(f'Grouping variables into instances')
instances = ipsutil.group_ensemble_variables_into_instances(variables, name)

# save the variables on both disk and to the IPS Portal
csv_out = Path(run_dir) / f'{name}__ensemble_variables.csv'
ipsutil.ensemble_instances_to_csv(instances, csv_out)

self.debug('Sending ensemble instance to portal')
send_ensemble_instance_to_portal(name, csv_out)
self.debug('Done sending ensemble instance to portal')

# For each coupled simulation instance
for instance in instances:
Expand Down Expand Up @@ -2801,6 +2805,7 @@ def send_ensemble_instance_to_portal(ensemble_name: str, data_path: Path) -> Non


if self.fwk.logger.getEffectiveLevel() == logging.DEBUG:
self.debug(f'Setting subordinate instances logger to debug')
# If we're in debug mode, then also pass the debug flag.
# May as well pass in the --verbose, too.
args.insert(1, '--debug')
Expand All @@ -2810,6 +2815,7 @@ def send_ensemble_instance_to_portal(ensemble_name: str, data_path: Path) -> Non

try:
# Note that we *always* use Dask to run the ensemble tasks
self.logger.debug(f'Submitting {len(instances)} ensemble tasks')
num_submitted = self.submit_tasks(
task_pool_name,
block=True,
Expand Down
Loading