I'm trying to perform pose-associated activities as part of inferencing. I'm using Fastapi to perform inferencing on Sagemaker by following https://sii.ua/blog/en/deploying-custom-models-on-aws-sagemaker-using-fastapi/
I have a bunch of pre-models in here which i have stored as a tar file on S3. Cmd used to tar the files:
cd opt/ml/
tar -czvf pre-models.tar.gz pre-models
In my code, i have set model path as 'ml/pre_models/(sub-dir varies as per requirement)' However, Sagemaker cannot find the model path. I get this line in cloudwatch:
"Fix path to models/ ml/pre_models/models"
I tried ls, and i can't see pre-models files in there.

For future self who lands here...
I had my code in /opt/ml/ and models in pre_models/
Sagemaker Inference creates a directory model/ to store the S3 models. So the final path appeared as :
To trace this path just keep on printing the directory structure from your code (in my case "invocations" API method