Skip to content

Commit

Permalink
fixup! Inline addNode function
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Oct 22, 2024
1 parent 942b952 commit 13e520c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/ert/config/ert_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ def __post_init__(self) -> None:
if self.user_config_file
else os.getcwd()
)
self.observations: Dict[str, polars.DataFrame] = self.enkf_obs.datasets
# self.observations: Dict[str, polars.DataFrame] = self.enkf_obs.datasets
self.observations: Dict[str, polars.DataFrame] = {}

@staticmethod
def with_plugins(
Expand Down
20 changes: 8 additions & 12 deletions tests/ert/unit_tests/simulator/test_batch_sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,17 @@ def __init__(self, ert_config, storage, controls, results, callback=None):
try:
ens_config = ert_config.ensemble_config
for control_name, variables in controls.items():
ens_config.addNode(
ExtParamConfig(
name=control_name,
input_keys=variables,
output_file=control_name + ".json",
)
ens_config.parameter_configs[control_name] = ExtParamConfig(
name=control_name,
input_keys=variables,
output_file=control_name + ".json",
)

if "gen_data" not in ens_config:
ens_config.addNode(
GenDataConfig(
keys=results,
input_files=[f"{k}" for k in results],
report_steps_list=[None for _ in results],
)
ens_config.response_configs["gen_data"] = GenDataConfig(
keys=results,
input_files=[f"{k}" for k in results],
report_steps_list=[None for _ in results],
)
else:
existing_gendata = ens_config.response_configs["gen_data"]
Expand Down

0 comments on commit 13e520c

Please sign in to comment.