Skip to content
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

When I run AMD in python, it always stops at ruvsearch and reports an error #142

Open
leahww opened this issue Jul 15, 2023 · 4 comments
Open

Comments

@leahww
Copy link

leahww commented Jul 15, 2023

Hello everyone,
I'm experiencing a problem.
When I run this code in python 3.9.12.

from pharmpy.modeling import *
from pharmpy.tools import run_amd, load_example_modelfit_results
model = load_example_model("pheno")
results = load_example_modelfit_results("pheno")
order = ['structural', 'iivsearch', 'residual', 'covariates']
run_amd(model, results=results, order=order)

It always stops at the ruvsearch step and reports an error. Here is the first three error messages.

D:\Unusualsoftware\Python39\lib\site-packages\pharmpy\tools\external\nonmem\run.py:117: UserWarning: Expected result files do not exist, copying everything: time_varying3_1
  warnings.warn(f'Expected result files do not exist, copying everything: {basename}')
D:\Unusualsoftware\Python39\lib\site-packages\pharmpy\tools\external\nonmem\run.py:117: UserWarning: Expected result files do not exist, copying everything: time_varying1_1
  warnings.warn(f'Expected result files do not exist, copying everything: {basename}')
D:\Unusualsoftware\Python39\lib\site-packages\pharmpy\tools\external\nonmem\run.py:117: UserWarning: Expected result files do not exist, copying everything: time_varying2_1
  warnings.warn(f'Expected result files do not exist, copying everything: {basename}')

I checked iivsearch,both successfully run results.csv and subfolders for each model.I also installed the tflite package.
I don't know what went wrong.
Could you please advise.

@stellabelin
Copy link
Contributor

Hi! Thanks for reporting! If you check the best model from IIVSearch (will be ranked first in results.csv), do the .lst and .ext-files look okay? And in the table file, do you have values for CWRES?

@leahww
Copy link
Author

leahww commented Jul 21, 2023

Hi, thanks for your reply. I am very sorry for not seeing your message in time.
I checked the best model for IIVSearch, and it's .lst and .ext files are fine (compared to the IIVSearch warp for the model below that runs smoothly, and the results are consistent), and CWRES has values.
Also, I tried removing 'residual' from 'order' to make it order = ['structural', 'iivsearch', 'covariates'] and it worked fine.
In addition, I also tried running run_ruvsearch alone with the following code, and it reported the same error as before.

from pharmpy.modeling import load_example_model
from pharmpy.tools import run_ruvsearch, load_example_modelfit_results

model = load_example_model("pheno")
results = load_example_modelfit_results("pheno")
run_ruvsearch(model=model, results=results)

@stellabelin
Copy link
Contributor

Hi! Thanks for sending a minimal example code, I tried running it locally and it worked on my machine so I cannot reproduce this behavior. The error you report happens when e.g. the .ext and .lst-files do not exist, and in this case it looks like it's the time varying proxy models that fail. What do the STDOUT/STDERR files look like?

@leahww
Copy link
Author

leahww commented Jul 23, 2023

Hi, thanks for your reply, I checked my STDOUT/STDERR files and at runruvsearch/model all STDERR files are blank and the following code appears in all STDERR files:

Starting NMTRAN
 
 AN ERROR WAS FOUND IN THE CONTROL STATEMENTS.
 
AN ERROR WAS FOUND ON LINE 6 AT THE APPROXIMATE POSITION NOTED:
 Y = THETA(1) + ETA_BASE + EPS(2)/IPRED + EPS(1)
                 X       
 THE CHARACTERS IN ERROR ARE: ETA_BASE
  208  UNDEFINED VARIABLE.

In runruvsearch/model all $DATA is power_1.csv.
I genuinely appreciate your help and support.

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

2 participants