-
Notifications
You must be signed in to change notification settings - Fork 10
A bad reference config fails every inference worker with no reason given #803
Copy link
Copy link
Open
Labels
BugSomething isn't workingSomething isn't workingGrids/EnsemblesRelating to grids or forward modelsRelating to grids or forward modelsInterraIssue has been imported to the Interra Board projectIssue has been imported to the Interra Board projectPriority 1: criticalPriority level 1: highest priority – critical & fastPriority level 1: highest priority – critical & fastSoftwareRelating to software and implementationRelating to software and implementationimport
Description
Activity
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't workingGrids/EnsemblesRelating to grids or forward modelsRelating to grids or forward modelsInterraIssue has been imported to the Interra Board projectIssue has been imported to the Interra Board projectPriority 1: criticalPriority level 1: highest priority – critical & fastPriority level 1: highest priority – critical & fastSoftwareRelating to software and implementationRelating to software and implementationimport
Type
Projects
- StatusShow more project fieldsSoftware & tests
Problem description
proteus inferchecks its reference config withos.path.isfileand nothing more (src/proteus/inference/inference.py, the block that resolvesconfig['ref_config']). The file is copied into the output directory and handed to the workers without ever being read against the schema, so a mistake in it survives the whole setup.The first worker is where it surfaces, and it surfaces badly.
run_proteusinsrc/proteus/inference/objective.pywrites the per-case config out of the reference file and runsproteus startas a subprocess withstdout=subprocess.DEVNULLandstderr=subprocess.STDOUT. The child does refuse an unrecognised key and does say which one, but it says it on stderr, and stderr follows stdout into/dev/null. What reaches the log isFailed to run PROTEUS for worker=0 iter=0; exit code 1, with nothing pointing at the reference config. Every worker then fails the same way, so a whole optimisation burns through its budget with no usable diagnosis.The discarded output is not specific to this fault. Any reason a child run dies is thrown away the same way.
Expected behavior
The reference config is loaded through
read_config_objectat startup, next to the existingos.path.isfilecheck, so a typo stops the run before any worker is spawned and names the offending key.Separately, when a child run fails, its output is captured and logged rather than discarded.
Evidence
The child reports the fault, and reports it exactly where the inference module has arranged not to look:
bad.tomlisinput/dummy.tomlwith one unrecognised key added. That message is on stderr, whichrun_proteussends to/dev/null.My computer
macOS on arm64, Python 3.12.
Additional notes
Two independent fixes here. Validating the reference config up front is the one that closes this specific hole. Capturing the child's output is worth doing on its own, since it applies to every way a worker run can fail.
Relevant people
@nichollsh