ert
ert copied to clipboard
`Restart` experiment (or realization) from GUI does unexpected things
Describe the bug A clear and concise description of what the bug is.
To reproduce Steps to reproduce the behaviour:
-
pip install ert
- Modify
poly_eval.py
such that some realizations fail:
#!/usr/bin/env python3
import json
import random
def _load_coeffs(filename):
with open(filename, encoding="utf-8") as f:
return json.load(f)["COEFFS"]
def _evaluate(coeffs, x):
return coeffs["a"] * x**2 + coeffs["b"] * x + coeffs["c"]
if __name__ == "__main__":
if random.random() > 0.5:
raise ValueError("Failed realization.")
coeffs = _load_coeffs("parameters.json")
output = [_evaluate(coeffs, x) for x in range(10)]
with open("poly.out", "w", encoding="utf-8") as f:
f.write("\n".join(map(str, output)))
- Run
Ensemble experiment
About 50% of realizations should fail:
- Hit
Restart
Notice that only the failed realizations remain:
Also, at this stage, we have two experiments and two ensembles in the storage:
➜ poly_example git:(main) ✗ tree storage -L 2
storage
├── ensembles
│ ├── 8779c158-35ed-408a-b41b-32646e95af59
│ └── b6e6e80e-a22a-4ff0-8b92-7329f82110f9
├── experiments
│ ├── 3f4e4c2c-ef44-4f8a-a3e0-acf8d146a186
│ └── e820f829-afe6-4444-b64e-b9afee588759
├── index.json
├── storage.lock
└── storage_server.json
Expected behaviour
I expect Restart
to restart only the failed realizations and keep the successful ones.
I also expect the restart to happen in the same experiment and in the same ensemble, i.e., no new experiments or ensembles should be created.