Skip to content

Commit

Permalink
Fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Dec 18, 2024
1 parent be90d35 commit aa1b65e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ert/config/analysis_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AnalysisConfig:
ies_module: IESSettings = field(default_factory=IESSettings)
observation_settings: UpdateSettings = field(default_factory=UpdateSettings)
num_iterations: int = 1
design_matrices: list[DesignMatrix] = field(default_factory=list)
design_matrix: DesignMatrix | None = None

@no_type_check
@classmethod
Expand Down Expand Up @@ -191,14 +191,19 @@ def from_dict(cls, config_dict: ConfigDict) -> AnalysisConfig:
DesignMatrix.from_config_list(design_matrix_config_list)
for design_matrix_config_list in design_matrix_config_lists
]
design_matrix: DesignMatrix | None = None
if design_matrices:
design_matrix = design_matrices[0]
for dm_other in design_matrices[1:]:
design_matrix = design_matrix.merge_with_other(dm_other)
config = cls(
max_runtime=config_dict.get(ConfigKeys.MAX_RUNTIME),
minimum_required_realizations=min_realization,
update_log_path=config_dict.get(ConfigKeys.UPDATE_LOG_PATH, "update_log"),
observation_settings=obs_settings,
es_module=es_settings,
ies_module=ies_settings,
design_matrices=design_matrices,
design_matrix=design_matrix,
)
return config

Expand Down

0 comments on commit aa1b65e

Please sign in to comment.