0

I'm deploying an endpoint using a Pytorch model, in the input_fn I have the following:

os.mkdir('outputs')
os.mkdir('outputs/assets')

At the end of the outpu_fn I remove the output folder

But when invoking the endpoint I get the following error:

OSError: [Errno 30] Read-only file system: 'outputs'

Am I not allowed to create a folder in /opt/ml/model ?

  • 1
    can you try os.makedirs('outputs') here is the reference https://github.com/aws/amazon-sagemaker-examples/blob/main/frameworks/pytorch/code/test_inference.py – yashaswi k Aug 10 '23 at 06:13

0 Answers0