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

Predict outliers and predict influential individuals #135

Open
SaraSALHI2 opened this issue Apr 13, 2023 · 2 comments
Open

Predict outliers and predict influential individuals #135

SaraSALHI2 opened this issue Apr 13, 2023 · 2 comments
Labels
question Further information is requested

Comments

@SaraSALHI2
Copy link

Hello everyone,
I can't use predict outliers or influential individuals in PharmR as I always receive the same error "No module named 'tflite_runtime"

Could you please advise

@rikardn rikardn added the question Further information is requested label Apr 13, 2023
@rikardn
Copy link
Contributor

rikardn commented Apr 13, 2023

Unfortunately this is a bit complicated at the moment. Installing tflite ranges from a bit involved to almost impossible depending on which operating system and Python version you are using.

It is currently supported on linux with Python 3.8, 3.9 or 3.10, MacOS with Python 3.8 and 3.9 and Windows with Python 3.8 and 3.9. Since you are using R the package needs to be manually installed in the virtual environment that reticulate is using (by default r-reticulate). reticulate::py_config can be used to check which environment and Python version is being used. If you are on one of the supported platforms you can activate the virtual environment and install using one of the pip descriptions below:

tflite-runtime==2.11.0; sys_platform == 'linux' and python_version == '3.8'
tflite-runtime==2.11.0; sys_platform == 'linux' and python_version == '3.9'
tflite-runtime==2.5.0; sys_platform == 'darwin' and python_version == '3.8'
tflite_runtime @ https://github.com/hjonnala/snippets/raw/main/wheels/python3.10/tflite_runtime-2.5.0.post1-cp310-cp310-linux_x86_64.whl ; sys_platform == 'linux' and python_version == '3.10'
--extra-index-url https://google-coral.github.io/py-repo/
tflite_runtime==2.5.0.post1; sys_platform == 'darwin' and python_version == '3.9'
tflite_runtime==2.5.0.post1; sys_platform == 'win32' and python_version == '3.8'
tflite_runtime==2.5.0.post1; sys_platform == 'win32' and python_version == '3.9'

Sorry for this being difficult at the moment. In the future we will try to support more platforms and make it easier to use.

@SaraSALHI2
Copy link
Author

Hi,

Thank you Rikard, it worked very well.
PharmPy was installed in a virtual folder however now that I installed PsN library in Rstudio I realized that I have two PharmPy one in the virtual folder and another in miniconda3. In Rstudio it mutated to miniconda3 instead of .entvirtual path therefore I can't fit the models anymore and don't receive modelfitresults even if I added NONMEM path to both config.py file
Do you have an idea why it happened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants