Skip to content

Conversation

@mduncans
Copy link
Collaborator

Updated read_model to be more restrictive in input. must provide path to mod/ctl file not in output directory.

> mod <- read_model("vignettes/test_data/models/onecmt/run003/run003.mod")
Error occurred in Hyperion
Reason:
	Expected input model file, got output model file: vignettes/test_data/models/onecmt/run003/run003.mod
	Try: vignettes/test_data/models/onecmt/run003.mod

hyperion_nonmem_model objects now have the following attributes:

  • model_source to relative path to mod file used:
> mod <- read_model("vignettes/test_data/models/onecmt/run003.mod")
> attr(mod, "model_source")
[1] "vignettes/test_data/models/onecmt/run003.mod"
  • run_status to show if run/run with errors/not run
> attr(mod, "run_status")
[1] "completed"

Run status is determined if output directory exists (file stem of mod file) and the ext file exists with content in -1000000000 line, then run status is completed. If no content in final estimates line in ext file, or ext file does not exist, but lst file does, then run status is run_with_errors. If no output directory exists then run status is not_run

added extraction of Model content from lst file

> lst_mod <- read_model_from_lst("vignettes/test_data/models/onecmt/run003/run003.lst")
> attr(lst_mod, "run_status")
[1] "completed"
> attr(lst_mod, "model_source")
[1] "vignettes/test_data/models/onecmt/run003/run003.lst

@mduncans mduncans merged commit dfadcbe into main Jan 20, 2026
6 checks passed
@mduncans mduncans deleted the lst-mod branch January 20, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants