You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create an S3 Bucket that your
profile can access and upload your state dictionary
Configure the serverless.yml
### Change service name to whatever you please
service: pytorch-serverless
provider:
...
### set this to your deployment stage
stage: dev
### set this to your aws region
region: us-west-2
### set this to your aws profile
profile: slsadmin
### set this as needed between 128 - 3008, in 64mb intervals
memorySize: 2048
### set this as needed (max 300)
timeout: 120
...
environment:
### set this to your S3 bucket name
BUCKET_NAME: pytorch-serverless
### set this to your state dict filename
STATE_DICT_NAME: dogscats-resnext50.h5
### set this to your input image size
IMAGE_SIZE: 224
### set this to your image normalization stats
IMAGE_STATS: ([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
...
variables:
### set this to your api version
api_version: v0.0.1
Invoke Local
Run function locally with params defined in tests/predict_event.json
AWS_PROFILE=yourProfile sls invoke local -f predict -p tests/predict_event.json