Skip to content

run_amd() stops at covsearch on cluster #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gustafwellhagen opened this issue Feb 6, 2025 · 0 comments
Open

run_amd() stops at covsearch on cluster #187

gustafwellhagen opened this issue Feb 6, 2025 · 0 comments

Comments

@gustafwellhagen
Copy link

Loading required package: altair
amd1 2025-02-05 INFO Starting tool amd
23:15:24
amd1 2025-02-05 WARNING IOVsearch will be skipped because
23:15:26 occasion is None.
amd1 2025-02-05 WARNING Allometry will be skipped because
23:15:26 allometric_variable is None and
could not be inferred through
.datainfo via "body weight"
descriptor.
amd1/modelfit 2025-02-05 INFO Dispatching workflow in <Local
23:15:27 directory context at
/crex/proj/pmgroup_active_storage/…
<Client:
'inproc://172.18.9.169/2920/1'
processes=1 threads=1, memory=6.25
GiB>
amd1/modelfit 2025-02-05 INFO End dispatch
23:15:39
amd1/modelsearch 2025-02-05 INFO Dispatching workflow in <Local
23:15:39 directory context at
/crex/proj/pmgroup_active_storage/…
<Client:
'inproc://172.18.9.169/2920/10'
processes=1 threads=1, memory=6.25
GiB>
amd1/modelsearch 2025-02-05 INFO Starting tool modelsearch
23:15:39
amd1/modelsearch 2025-02-05 INFO Input model OFV: -1779.317
23:15:39
amd1/modelsearch 2025-02-05 INFO Starting algorithm
23:15:39 'reduced_stepwise'
amd1/modelsearch/@mode2025-02-05 WARNING Expected result files do not exist,
lsearch_run16 23:27:12 copying everything
amd1/modelsearch/@mode2025-02-06 WARNING Expected result files do not exist,
lsearch_run1 00:51:52 copying everything
amd1/modelsearch/@mode2025-02-06 WARNING Expected result files do not exist,
lsearch_run11 02:05:01 copying everything
amd1/modelsearch 2025-02-06 INFO Finished algorithm
03:17:46 'reduced_stepwise'. Best model:
modelsearch_run2, OFV: -1902.276
amd1/modelsearch 2025-02-06 INFO Finishing tool modelsearch
03:17:46
amd1/modelsearch 2025-02-06 INFO End dispatch
03:17:46
amd1/structural_retrie2025-02-06 INFO Dispatching workflow in <Local
s 03:18:01 directory context at
/crex/proj/pmgroup_active_storage/…
<Client:
'inproc://172.18.9.169/2920/19'
processes=1 threads=1, memory=6.25
GiB>
amd1/structural_retrie2025-02-06 INFO End dispatch
s 03:24:33
amd1/iivsearch 2025-02-06 INFO Dispatching workflow in <Local
03:24:41 directory context at
/crex/proj/pmgroup_active_storage/…
<Client:
'inproc://172.18.9.169/2920/28'
processes=1 threads=1, memory=6.25
GiB>
amd1/iivsearch 2025-02-06 INFO Starting tool iivsearch
03:24:41
amd1/iivsearch 2025-02-06 INFO Input model OFV: -1903.546
03:24:41
amd1/iivsearch 2025-02-06 INFO Creating base model
03:24:41
amd1/iivsearch 2025-02-06 INFO Starting step
03:24:41 'td_exhaustive_no_of_etas'
amd1/iivsearch 2025-02-06 INFO Finished step
03:25:43 'td_exhaustive_no_of_etas'. Best
model: [CL,VC,D1], OFV: -1910.377
amd1/iivsearch 2025-02-06 INFO Starting step
03:25:43 'td_exhaustive_block_structure'
amd1/iivsearch 2025-02-06 INFO Finished step
03:27:44 'td_exhaustive_block_structure'.
Best model: [D1]+[CL,VC], OFV:
-1903.525
amd1/iivsearch 2025-02-06 WARNING Worse bic in final model
03:27:44 iivsearch_run5 than input,
selecting input model
amd1/iivsearch 2025-02-06 INFO Finishing tool iivsearch
03:27:44
amd1/iivsearch 2025-02-06 INFO End dispatch
03:27:44
amd1/iivsearch_retries2025-02-06 INFO Dispatching workflow in <Local
03:27:52 directory context at
/crex/proj/pmgroup_active_storage/…
<Client:
'inproc://172.18.9.169/2920/37'
processes=1 threads=1, memory=6.25
GiB>
amd1/iivsearch_retries2025-02-06 INFO End dispatch
03:30:23
amd1/ruvsearch 2025-02-06 INFO Dispatching workflow in <Local
03:30:31 directory context at
/crex/proj/pmgroup_active_storage/…
<Client:
'inproc://172.18.9.169/2920/46'
processes=1 threads=1, memory=6.25
GiB>
amd1/ruvsearch 2025-02-06 INFO Starting tool ruvsearch
03:30:31
amd1/ruvsearch 2025-02-06 INFO Input model OFV: -1903.546
03:30:31
amd1/ruvsearch 2025-02-06 INFO Starting iteration 1
03:30:31
amd1/ruvsearch 2025-02-06 INFO Best model after iteration OFV:
03:31:11 -2058.102
amd1/ruvsearch 2025-02-06 INFO Starting iteration 2
03:31:11
amd1/ruvsearch 2025-02-06 INFO Best model after iteration OFV:
03:31:41 -2058.102
amd1/ruvsearch 2025-02-06 INFO Finishing tool ruvsearch
03:31:41
amd1/ruvsearch 2025-02-06 INFO End dispatch
03:31:41
amd1/residual_retries 2025-02-06 INFO Dispatching workflow in <Local
03:31:49 directory context at
/crex/proj/pmgroup_active_storage/…
<Client:
'inproc://172.18.9.169/2920/55'
processes=1 threads=1, memory=6.25
GiB>
amd1/residual_retries 2025-02-06 INFO End dispatch
03:33:56
amd1/covsearch_explora2025-02-06 INFO Dispatching workflow in <Local
tory 03:34:08 directory context at
/crex/proj/pmgroup_active_storage/…
<Client:
'inproc://172.18.9.169/2920/64'
processes=1 threads=1, memory=6.25
GiB>
amd1/covsearch_explora2025-02-06 INFO Starting tool covsearch
tory 03:34:08
2025-02-06 03:36:44,611 - distributed.worker - ERROR - Compute Failed
Key: CL-run4-89869d6b-6005-4391-b21b-f3b2e002ef3b
State: executing
Task: <Task 'CL-run4-89869d6b-6005-4391-b21b-f3b2e002ef3b' task(...)>
Exception: "ValueError('Symbol theta1 is not defined')"
Traceback: ' File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 739, in task_add_covariate_effect\n model_with_added_effect = func(model_with_added_effect, allow_nested=True)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/modeling/covariate_effect.py", line 484, in add_covariate_effect\n model = model.replace(parameters=pset, statements=sset)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/model/model.py", line 353, in replace\n statements = Model._canonicalize_statements(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/model/model.py", line 222, in _canonicalize_statements\n raise ValueError(f'Symbol {symb} is not defined')\n'

2025-02-06 03:36:44,622 - distributed.worker - ERROR - Compute Failed
Key: backward-search-create_modelentry-forward-search-init-store_input_model-results
State: long-running
Task: <Task 'backward-search-create_modelentry-forward-search-init-store_input_model-results' task_results(...)>
Exception: "ValueError('Symbol theta1 is not defined')"
Traceback: ' File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 425, in task_greedy_forward_search\n return _greedy_search(\n ^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 513, in _greedy_search\n nonsignificant_effects, all_candidates_so_far, best_candidate_so_far = perform_step_procedure(\n ^^^^^^^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 593, in perform_step_procedure\n new_candidates = handle_effects(\n ^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 419, in handle_effects\n new_candidate_modelentries = context.call_workflow(wf, f'{NAME_WF}-effects_addition-{step}')\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/contexts/baseclass.py", line 252, in call_workflow\n res = call_workflow(workflow, unique_name, self)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/dispatchers/local_dask/call.py", line 41, in call_workflow\n res: T = client.gather(futures) # pyright: ignore [reportGeneralTypeIssues]\n ^^^^^^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/distributed/client.py", line 2565, in gather\n return self.sync(\n ^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 739, in task_add_covariate_effect\n model_with_added_effect = func(model_with_added_effect, allow_nested=True)\n ^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/modeling/covariate_effect.py", line 484, in add_covariate_effect\n model = model.replace(parameters=pset, statements=sset)\n ^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/model/model.py", line 353, in replace\n statements = Model._canonicalize_statements(\n ^^^^^^^^^^^^^^^^^\n File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/model/model.py", line 222, in _canonicalize_statements\n raise ValueError(f'Symbol {symb} is not defined')\n ^^^^^^^^^^^^^^^^^\n'

Full stack:
ValueError: Symbol theta1 is not defined
Run reticulate::py_last_error() for details.ValueErrorSymbol theta1 is not definedc(" File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/amd/run.py", line 552, in run_amd\n subresults = func(next_model, next_res)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/amd/run.py", line 1128, in _run_mechanistic_exploratory_covariates\n res = run_tool(\n ^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/run.py", line 189, in run_tool\n return run_tool_with_name(name, tool, args, kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/run.py", line 244, in run_tool_with_name\n res = execute_workflow(wf, dispatcher=dispatcher, context=ctx)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/execute.py", line 73, in execute_workflow\n res: T = dispatcher.run(workflow, context)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/dispatchers/local_dask/run.py", line 85, in run\n res = client.get(dsk_optimized, 'results')\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/distributed/client.py", line 3492, in get\n results = self.gather(packed, asynchronous=asynchronous, direct=direct)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/distributed/client.py", line 2565, in gather\n return self.sync(\n ^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 425, in task_greedy_forward_search\n return _greedy_search(\n ^^^^^^^^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 513, in _greedy_search\n nonsignificant_effects, all_candidates_so_far, best_candidate_so_far = perform_step_procedure(\n ^^^^^^^^^^^^^^^^^\n",
" File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 593, in perform_step_procedure\n new_candidates = handle_effects(\n ^^^^^^^^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 419, in handle_effects\n new_candidate_modelentries = context.call_workflow(wf, f'{NAME_WF}-effects_addition-{step}')\n ^^^^^^^^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/contexts/baseclass.py", line 252, in call_workflow\n res = call_workflow(workflow, unique_name, self)\n ^^^^^^^^^^^^^^^^^\n",
" File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/dispatchers/local_dask/call.py", line 41, in call_workflow\n res: T = client.gather(futures) # pyright: ignore [reportGeneralTypeIssues]\n ^^^^^^^^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 739, in task_add_covariate_effect\n model_with_added_effect = func(model_with_added_effect, allow_nested=True)\n ^^^^^^^^^^^^^^^^^\n",
" File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/modeling/covariate_effect.py", line 484, in add_covariate_effect\n model = model.replace(parameters=pset, statements=sset)\n ^^^^^^^^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/model/model.py", line 353, in replace\n statements = Model._canonicalize_statements(\n ^^^^^^^^^^^^^^^^^\n", " File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/model/model.py", line 222, in _canonicalize_statements\n raise ValueError(f'Symbol {symb} is not defined')\n ^^^^^^^^^^^^^^^^^\n"
)Traceback (most recent call last):
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/amd/run.py", line 552, in run_amd
subresults = func(next_model, next_res)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/amd/run.py", line 1128, in _run_mechanistic_exploratory_covariates
res = run_tool(
^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/run.py", line 189, in run_tool
return run_tool_with_name(name, tool, args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/run.py", line 244, in run_tool_with_name
res = execute_workflow(wf, dispatcher=dispatcher, context=ctx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/execute.py", line 73, in execute_workflow
res: T = dispatcher.run(workflow, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/dispatchers/local_dask/run.py", line 85, in run
res = client.get(dsk_optimized, 'results')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/distributed/client.py", line 3492, in get
results = self.gather(packed, asynchronous=asynchronous, direct=direct)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/distributed/client.py", line 2565, in gather
return self.sync(
^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 425, in task_greedy_forward_search
return _greedy_search(
^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 513, in _greedy_search
nonsignificant_effects, all_candidates_so_far, best_candidate_so_far = perform_step_procedure(
^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 593, in perform_step_procedure
new_candidates = handle_effects(
^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 419, in handle_effects
new_candidate_modelentries = context.call_workflow(wf, f'{NAME_WF}-effects_addition-{step}')
^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/contexts/baseclass.py", line 252, in call_workflow
res = call_workflow(workflow, unique_name, self)
^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/workflows/dispatchers/local_dask/call.py", line 41, in call_workflow
res: T = client.gather(futures) # pyright: ignore [reportGeneralTypeIssues]
^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/tools/covsearch/tool.py", line 739, in task_add_covariate_effect
model_with_added_effect = func(model_with_added_effect, allow_nested=True)
^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/modeling/covariate_effect.py", line 484, in add_covariate_effect
model = model.replace(parameters=pset, statements=sset)
^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/model/model.py", line 353, in replace
statements = Model._canonicalize_statements(
^^^^^^^^^^^^^^^^^
File "/domus/h1/gustafw/.virtualenvs/r-reticulate/lib/python3.11/site-packages/pharmpy/model/model.py", line 222, in _canonicalize_statements
raise ValueError(f'Symbol {symb} is not defined')
^^^^^^^^^^^^^^^^^
ValueError: Symbol theta1 is not defined
py_call_impl(callable, call_args$unnamed, call_args$named)c("python.builtin.ValueError", "python.builtin.Exception", "python.builtin.BaseException", "python.builtin.object", "error", "condition")list(call = list(run_amd(input = "new_PK_data_25-02-05.csv", modeltype = "basic_pk", administration = "oral", cl_init = 65, vc_init = 45, mat_init = 1, strategy = "default", search_space = search_space, allometric_variable = NULL, occasion = NULL), tryCatch({
mechanistic_covariates <- convert_input(mechanistic_covariates, "list")
seed <- convert_input(seed, "int")
func_out <- pharmpy$tools$run_amd(input, results = results, modeltype = modeltype, administration = administration, strategy = strategy, cl_init = cl_init, vc_init = vc_init, mat_init = mat_init, b_init = b_init, emax_init = emax_init, ec50_init = ec50_init, met_init = met_init, search_space = search_space, lloq_method = lloq_method, lloq_limit = lloq_limit, allometric_variable = allometric_variable, occasion = occasion, path = path, resume = resume, strictness = strictness, dv_types = dv_types,
mechanistic_covariates = mechanistic_covariates, retries_strategy = retries_strategy, seed = seed, parameter_uncertainty_method = parameter_uncertainty_method, ignore_datainfo_fallback = ignore_datainfo_fallback, _E = .E)
if ("pharmpy.workflows.results.Results" %in% class(func_out)) {
func_out <- reset_indices_results(func_out)
}
return(py_to_r(func_out))
}, error = function(cond) {
err <- reticulate::py_last_error()
if (is.null(err)) {
message(cond)
}
else if (err$type == "InputValidationError") {
message(err$value)
}
else {
message("Full stack:")
message(cond)
message(err)
message("pharmr version: ", packageVersion("pharmr"))
message("Pharmpy version: ", print_pharmpy_version())
message("This is a BUG. Please report it at https://github.com/pharmpy/pharmpy/issues. Thanks!")
}
return(NA)
}, warning = function(cond) {
err <- reticulate::py_last_error()
if (is.null(err)) {
message(cond)
}
else if (err$type == "InputValidationError") {
message(err$value)
}
else {
message("Full stack:")
message(cond)
message(err)
message("pharmr version: ", packageVersion("pharmr"))
message("Pharmpy version: ", print_pharmpy_version())
message("This is a BUG. Please report it at https://github.com/pharmpy/pharmpy/issues. Thanks!")
}
return(NA)
}), tryCatchList(expr, classes, parentenv, handlers), tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]), doTryCatch(return(expr), name, parentenv, handler), tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), tryCatchOne(expr, names, parentenv, handlers[[1]]), doTryCatch(return(expr), name, parentenv, handler), pharmpy$tools$run_amd(input, results = results, modeltype = modeltype, administration = administration, strategy = strategy,
cl_init = cl_init, vc_init = vc_init, mat_init = mat_init, b_init = b_init, emax_init = emax_init, ec50_init = ec50_init, met_init = met_init, search_space = search_space, lloq_method = lloq_method, lloq_limit = lloq_limit, allometric_variable = allometric_variable, occasion = occasion, path = path, resume = resume, strictness = strictness, dv_types = dv_types, mechanistic_covariates = mechanistic_covariates, retries_strategy = retries_strategy, seed = seed, parameter_uncertainty_method = parameter_uncertainty_method,
ignore_datainfo_fallback = ignore_datainfo_fallback, _E = .E), py_call_impl(callable, call_args$unnamed, call_args$named)), parent = c(0, 1, 2, 3, 4, 3, 6, 7, 1, 9), visible = c(TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), namespace = c("pharmr", "base", "base", "base", "base", "base", "base", "base", NA, "reticulate"), scope = c("::", "::", "local", "local", "local", "local", "local", "local", NA, ":::"), full_call = list(run_amd(input = "new_PK_data_25-02-05.csv", modeltype = "basic_pk",
administration = "oral", cl_init = 65, vc_init = 45, mat_init = 1, strategy = "default", search_space = search_space, allometric_variable = NULL, occasion = NULL), tryCatch({
mechanistic_covariates <- convert_input(mechanistic_covariates, "list")
seed <- convert_input(seed, "int")
func_out <- pharmpy$tools$run_amd(input, results = results, modeltype = modeltype, administration = administration, strategy = strategy, cl_init = cl_init, vc_init = vc_init, mat_init = mat_init, b_init = b_init, emax_init = emax_init, ec50_init = ec50_init, met_init = met_init, search_space = search_space, lloq_method = lloq_method, lloq_limit = lloq_limit, allometric_variable = allometric_variable, occasion = occasion, path = path, resume = resume, strictness = strictness, dv_types = dv_types,
mechanistic_covariates = mechanistic_covariates, retries_strategy = retries_strategy, seed = seed, parameter_uncertainty_method = parameter_uncertainty_method, ignore_datainfo_fallback = ignore_datainfo_fallback, _E = .E)
if ("pharmpy.workflows.results.Results" %in% class(func_out)) {
func_out <- reset_indices_results(func_out)
}
return(py_to_r(func_out))
}, error = function(cond) {
err <- reticulate::py_last_error()
if (is.null(err)) {
message(cond)
}
else if (err$type == "InputValidationError") {
message(err$value)
}
else {
message("Full stack:")
message(cond)
message(err)
message("pharmr version: ", packageVersion("pharmr"))
message("Pharmpy version: ", print_pharmpy_version())
message("This is a BUG. Please report it at https://github.com/pharmpy/pharmpy/issues. Thanks!")
}
return(NA)
}, warning = function(cond) {
err <- reticulate::py_last_error()
if (is.null(err)) {
message(cond)
}
else if (err$type == "InputValidationError") {
message(err$value)
}
else {
message("Full stack:")
message(cond)
message(err)
message("pharmr version: ", packageVersion("pharmr"))
message("Pharmpy version: ", print_pharmpy_version())
message("This is a BUG. Please report it at https://github.com/pharmpy/pharmpy/issues. Thanks!")
}
return(NA)
}), tryCatchList(expr, classes, parentenv, handlers), tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], parentenv, handlers[[nh]]), doTryCatch(return(expr), name, parentenv, handler), tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), tryCatchOne(expr, names, parentenv, handlers[[1]]), doTryCatch(return(expr), name, parentenv, handler), pharmpy$tools$run_amd(input, results = results, modeltype = modeltype, administration = administration, strategy = strategy,
cl_init = cl_init, vc_init = vc_init, mat_init = mat_init, b_init = b_init, emax_init = emax_init, ec50_init = ec50_init, met_init = met_init, search_space = search_space, lloq_method = lloq_method, lloq_limit = lloq_limit, allometric_variable = allometric_variable, occasion = occasion, path = path, resume = resume, strictness = strictness, dv_types = dv_types, mechanistic_covariates = mechanistic_covariates, retries_strategy = retries_strategy, seed = seed, parameter_uncertainty_method = parameter_uncertainty_method,
ignore_datainfo_fallback = ignore_datainfo_fallback, _E = .E), py_call_impl(callable, call_args$unnamed, call_args$named)))
pharmr version: 1.5.0
'1.5.0'
Pharmpy version: 1.5.0
This is a BUG. Please report it at https://github.com/pharmpy/pharmpy/issues. Thanks!

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

No branches or pull requests

1 participant