Closed m-philipps closed 4 months ago
Ideally, the referenced line should also use amici.import_model_module
instead of importlib.import_module
. The former will also take the output directory as arguments.
Ah, nice. There's also a workaround with importlib.machinery.PathFinder()
but I supose the amici solution is preferred?
Bug description When using the
PetabImporter
the amici model is re-compiled although it is already available at the location specified by theoutput_folder
argument.Before compiling the amici model the
PetabImporter
checks if an amici module is already available, but does not check within subfolders of the current path: https://github.com/ICB-DCM/pyPESTO/blob/ee852cb216a65b12bf2d1e16edc8c0fba6c3e714/pypesto/petab/importer.py#L355-L356 This does not make use of theoutput_folder
argument.Expected behavior Since by default the amici models are compiled to the folder
amici_models/
I would expect those to be found and not recompiled.