retrieve_model#
- pharmpy.tools.retrieve_model(source, name)[source]#
Retrieve a model from a context/tool run
Any models created and run by the tool can be retrieved.
- Parameters:
source (str, Path, Context) – Source where to find models. Can be a path (as str or Path), or a Context
name (str) – Name of the model
- Returns:
Model – The model object
Examples
>>> from pharmpy.tools import retrieve_model >>> tooldir_path = 'path/to/tool/directory' >>> model = retrieve_model(tooldir_path, 'run1')