Skip to content

Commit

Permalink
Showing 9 changed files with 2 additions and 51 deletions.
8 changes: 0 additions & 8 deletions docs/reference/configuration/keywords.rst
Original file line number Diff line number Diff line change
@@ -46,7 +46,6 @@ Keyword name Required
:ref:`INCLUDE <include>` NO Include contents from another ert config
:ref:`INSTALL_JOB <install_job>` NO Install a job for use in a forward model
:ref:`INVERSION <inversion_algorithm>` NO Set inversion method for analysis module
:ref:`ITER_RETRY_COUNT <iter_retry_count>` NO 4 Number of retries for a iteration - iterated ensemble smoother
:ref:`JOBNAME <jobname>` NO <CONFIG_FILE>-<IENS> Name used for simulation files.
:ref:`JOB_SCRIPT <job_script>` NO Python script managing the forward model
:ref:`LOAD_WORKFLOW <load_workflow>` NO Load a workflow into ERT
@@ -1671,13 +1670,6 @@ UPDATE_LOG_PATH

A summary of the data used for updates are stored in this directory.

ITER_RETRY_COUNT
----------------
.. _iter_retry_count:

Number of retries for a iteration - iterated ensemble smoother.
Defaults to 4.

MAX_SUBMIT
----------
.. _max_submit:
12 changes: 0 additions & 12 deletions src/ert/config/analysis_config.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@

from pydantic import ValidationError

from .analysis_iter_config import AnalysisIterConfig
from .analysis_module import ESSettings, IESSettings
from .parsing import (
AnalysisMode,
@@ -41,15 +40,13 @@ def __init__(
max_runtime: int = 0,
min_realization: int = 0,
update_log_path: Union[str, Path] = "update_log",
analysis_iter_config: Optional[AnalysisIterConfig] = None,
analysis_set_var: Optional[List[Tuple[str, str, str]]] = None,
num_iterations: int = 1,
) -> None:
self._max_runtime = max_runtime
self.minimum_required_realizations = min_realization
self._alpha = alpha
self._std_cutoff = std_cutoff
self._analysis_iter_config = analysis_iter_config or AnalysisIterConfig()
self._update_log_path = Path(update_log_path)
self._min_realization = min_realization
self.num_iterations = num_iterations
@@ -203,7 +200,6 @@ def from_dict(cls, config_dict: ConfigDict) -> "AnalysisConfig":
max_runtime=config_dict.get(ConfigKeys.MAX_RUNTIME, 0),
min_realization=min_realization,
update_log_path=config_dict.get(ConfigKeys.UPDATE_LOG_PATH, "update_log"),
analysis_iter_config=AnalysisIterConfig(**config_dict),
analysis_set_var=config_dict.get(ConfigKeys.ANALYSIS_SET_VAR, []),
)
return config
@@ -235,18 +231,13 @@ def max_runtime(self) -> Optional[int]:
def have_enough_realisations(self, realizations: int) -> bool:
return realizations >= self.minimum_required_realizations

@property
def num_retries_per_iter(self) -> int:
return self._analysis_iter_config.iter_retry_count

def __repr__(self) -> str:
return (
"AnalysisConfig("
f"alpha={self._alpha}, "
f"max_runtime={self._max_runtime}, "
f"min_realization={self._min_realization}, "
f"update_log_path={self._update_log_path}, "
f"analysis_iter_config={self._analysis_iter_config}, "
)

def __eq__(self, other: object) -> bool:
@@ -268,7 +259,4 @@ def __eq__(self, other: object) -> bool:
if self.es_module != other.es_module:
return False

if self._analysis_iter_config != other._analysis_iter_config:
return False

return self.minimum_required_realizations == other.minimum_required_realizations
7 changes: 0 additions & 7 deletions src/ert/config/analysis_iter_config.py

This file was deleted.

1 change: 0 additions & 1 deletion src/ert/config/parsing/config_keywords.py
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@ class ConfigKeys(StrEnum):
ECLBASE = "ECLBASE"
ENKF_ALPHA = "ENKF_ALPHA"
ENSPATH = "ENSPATH"
ITER_RETRY_COUNT = "ITER_RETRY_COUNT"
FIELD = "FIELD"
FORWARD_MODEL = "FORWARD_MODEL"
GEN_DATA = "GEN_DATA"
1 change: 0 additions & 1 deletion src/ert/config/parsing/config_schema.py
Original file line number Diff line number Diff line change
@@ -314,7 +314,6 @@ def init_user_config_schema() -> ConfigSchemaDict:
int_keyword(ConfigKeys.MAX_RUNTIME),
stop_long_running_keyword(),
analysis_set_var_keyword(),
int_keyword(ConfigKeys.ITER_RETRY_COUNT),
# the two fault types are just added to the config object only to
# be able to print suitable messages before exiting.
gen_kw_keyword(),
1 change: 1 addition & 0 deletions src/ert/config/parsing/config_schema_deprecations.py
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
JUST_REMOVE_KEYWORDS = [
"ITER_CASE",
"ITER_COUNT",
"ITER_RETRY_COUNT",
"UMASK",
"LICENSE_PATH",
"LOG_FILE",
2 changes: 1 addition & 1 deletion src/ert/run_models/model_factory.py
Original file line number Diff line number Diff line change
@@ -290,7 +290,7 @@ def _setup_iterative_ensemble_smoother(
if args.num_iterations is not None
else 4,
minimum_required_realizations=config.analysis_config.minimum_required_realizations,
num_retries_per_iter=config.analysis_config.num_retries_per_iter,
num_retries_per_iter=4,
experiment_name=experiment_name,
config=config,
storage=storage,
3 changes: 0 additions & 3 deletions tests/unit_tests/config/config_dict_generator.py
Original file line number Diff line number Diff line change
@@ -212,7 +212,6 @@ class ErtConfigValues:
runpath_file: str
run_template: List[str]
enkf_alpha: float
iter_retry_count: PositiveInt
update_log_path: str
std_cutoff: float
max_runtime: PositiveInt
@@ -259,7 +258,6 @@ def to_config_dict(self, config_file, cwd, all_defines=True):
ConfigKeys.RUNPATH_FILE: self.runpath_file,
ConfigKeys.RUN_TEMPLATE: self.run_template,
ConfigKeys.ENKF_ALPHA: self.enkf_alpha,
ConfigKeys.ITER_RETRY_COUNT: self.iter_retry_count,
ConfigKeys.UPDATE_LOG_PATH: self.update_log_path,
ConfigKeys.STD_CUTOFF: self.std_cutoff,
ConfigKeys.MAX_RUNTIME: self.max_runtime,
@@ -408,7 +406,6 @@ def ert_config_values(draw, use_eclbase=booleans):
),
std_cutoff=st.just(std_cutoff),
enkf_alpha=small_floats,
iter_retry_count=positives,
update_log_path=directory_names(),
max_runtime=positives,
min_realizations=st.builds(
18 changes: 0 additions & 18 deletions tests/unit_tests/config/test_analysis_config.py
Original file line number Diff line number Diff line change
@@ -121,24 +121,6 @@ def test_analysis_config_modules(analysis_config):
assert isinstance(analysis_config.ies_module, IESSettings)


def test_analysis_config_iter_config_dict_initialisation():
analysis_config = AnalysisConfig.from_dict(
{
ConfigKeys.NUM_REALIZATIONS: 10,
ConfigKeys.ITER_RETRY_COUNT: 24,
}
)

assert analysis_config.num_retries_per_iter == 24


@pytest.mark.parametrize(
"analysis_config", [AnalysisConfig(), AnalysisConfig.from_dict({})]
)
def test_analysis_config_iter_config_default_initialisation(analysis_config):
assert analysis_config.num_retries_per_iter == 4


def test_incorrect_variable_raises_validation_error():
with pytest.raises(
ConfigValidationError, match="Input should be 'exact' or 'subspace'"

0 comments on commit aad5994

Please sign in to comment.