Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] Error when deploying model #4521

Open
kmoy1 opened this issue Jan 16, 2024 · 0 comments
Open

[Bug Report] Error when deploying model #4521

kmoy1 opened this issue Jan 16, 2024 · 0 comments

Comments

@kmoy1
Copy link

kmoy1 commented Jan 16, 2024

Link to the notebook
https://github.com/aws/amazon-sagemaker-examples/blob/main/sagemaker-python-sdk/pytorch_batch_inference/sagemaker_batch_inference_torchserve.ipynb

Describe the bug
When running the cell deploying the PyTorchModel to an endpoint, I get a FileNotFound error:

File ~/anaconda3/envs/python3/lib/python3.10/shutil.py:557, in copytree(src, dst, symlinks, ignore, copy_function, ignore_dangling_symlinks, dirs_exist_ok)
    518 """Recursively copy a directory tree and return the destination directory.
    519 
    520 If exception(s) occur, an Error is raised with a list of reasons.
   (...)
    554 `src` tree.
    555 """
    556 sys.audit("shutil.copytree", src, dst)
--> 557 with os.scandir(src) as itr:
    558     entries = list(itr)
    559 return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
    560                  ignore=ignore, copy_function=copy_function,
    561                  ignore_dangling_symlinks=ignore_dangling_symlinks,
    562                  dirs_exist_ok=dirs_exist_ok)

FileNotFoundError: [Errno 2] No such file or directory: 'code'

To reproduce
Run the notebook up to cell 20, the cell that contains

predictor = pytorch_model.deploy(instance_type='ml.t2.medium', 
                                 initial_instance_count=1, 
                                 endpoint_name='pytorch-inference-2024-01-16-20-00-36-466')

Logs
Explained above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant