Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline case_name variable #9254

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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: 2 additions & 4 deletions src/everest/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,11 @@ def get_internalized_keys(
internal_keys: Set = set()
with open_storage(storage_path, "r") as storage:
for batch_id in batch_ids:
case_name = f"batch_{batch_id}"
experiments = [*storage.experiments]
assert len(experiments) == 1
experiment = experiments[0]

ensemble = experiment.get_ensemble_by_name(case_name)
ensemble = experiment.get_ensemble_by_name(f"batch_{batch_id}")
if not internal_keys:
internal_keys = set(
ensemble.experiment.response_type_to_response_keys["summary"]
Expand Down Expand Up @@ -328,14 +327,13 @@ def load_simulation_data(
with open_storage(ens_path, "r") as storage:
# pylint: disable=unnecessary-lambda-assignment
def load_batch_by_id():
case_name = f"batch_{batch}"
experiments = [*storage.experiments]

# Always assume 1 experiment per simulation/enspath, never multiple
assert len(experiments) == 1
experiment = experiments[0]

ensemble = experiment.get_ensemble_by_name(case_name)
ensemble = experiment.get_ensemble_by_name(f"batch_{batch}")
return ensemble.load_all_summary_data()

batches = {elem[MetaDataColumnNames.BATCH] for elem in metadata}
Expand Down