Skip to content

Add scoreELFs: read and score only the named ELFs - #37

Open
eliotmcintire wants to merge 2 commits into
developmentfrom
scoreELFs
Open

eliotmcintire wants to merge 2 commits into
developmentfrom
scoreELFs

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Scoring jobs can now be told which ELFs to read. When each job in a campaign scores only its own ELF, the jobs no longer all read every ELF and wait on each other.

Affects: Nothing changes unless the new scoreELFs parameter is set; then only those ELFs are read and scored.

Technical details

Defect: .inputObjects (fireSimulator_validation.R, the done <- Filter(...) block) passed every finished ELF in hindcastPath to readHindcastELFs(); only skipELFs (a blacklist) could narrow it, so N chain score jobs each read N ELFs and contended on the same elfs Cache locks.

Fix: new parameter scoreELFs (default character(0) = every finished ELF). When set, the ELFs read are scoreELFs minus skipELFs; a name with no folder in hindcastPath stops the job ("not in hindcastPath", likely a typo); one that exists but has not finished all hindcastYears stops it too ("not finished"); so does a scoreELFs that is all in skipELFs. Each message names the ELFs. cacheKey = FALSE: only .inputObjects (never cached) reads it, and the ELFs it yields are already in init's key (as with hindcastPath, inputsPath). Version 0.0.0.9032, NEWS line added. README lists no parameters.

Reuses: hindcastFinishedYears(), readHindcastELFs(), setdiff on skipELFs; new: none (a few lines in .inputObjects).

Tests: new test in test-module.R (two toy ELFs plus an unfinished one, via toyHindcastFiles() and runToyModule()): default reads both, scoreELFs = "7.7" reads one, skipELFs is subtracted, an unfinished ELF, a nonexistent ELF and an all-skipped scoreELFs each error with their own message. On the base it fails (2 failures: all ELFs read, no error). Full suites, measured: branch 160 tests, 0 failed, 0 skipped (857 expectations); base (a5a003f, without the new test) 159 tests, 0 failed (851 expectations).

Independent of #34.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh

@eliotmcintire eliotmcintire added the enhancement New feature or request label Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant