What will be the value of path here? Adding a few prints in the handler tells me that it is set to /repository/.
However, it also looks like /repository/ does not contain model1.pt and model2.pt.
Is this on purpose? How can I update the code below to access model1.pt and model2.pt?
The problem was that, for some reason, not all files are pulled from the model repository.
For instance, files with .ckpt extension (it was the case for me) are not available in path directory. I had to change the extension of the model files for them to be downloaded.
This behavior is probably documented somewhere but I could not find it.
The problem is now solved. os.path.join(path, "model.pt") does the trick.