szymonmaszke / torchlambda

Lightweight tool to deploy PyTorch models to AWS Lambda
MIT License
125 stars 3 forks source link

TypeError: __init__() got an unexpected keyword argument 'compresslevel' #18

Open RoyIronGrey opened 2 years ago

RoyIronGrey commented 2 years ago

When I execute torchlambda layer ./model.ptc --destination "model.zip" I get the error below:

torchlambda:: Started packing Torchscript model to /home/ubuntu18/torchlambda/model.zip. Traceback (most recent call last): File "/home/ubuntu18/.local/bin/torchlambda", line 8, in sys.exit(main()) File "/home/ubuntu18/.local/lib/python3.6/site-packages/torchlambda/main.py", line 21, in main module.run(args) File "/home/ubuntu18/.local/lib/python3.6/site-packages/torchlambda/subcommands/layer.py", line 18, in run args.compression, args.compression_level TypeError: init() got an unexpected keyword argument 'compresslevel'

This is my env: Linux version 4.15.0-167-generic (buildd@lcy02-amd64-045) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #175-Ubuntu SMP Wed Jan 5 01:56:07 UTC 2022

Python 3.6.13 :: Anaconda, Inc.

torch: 1.7.0+cpu

torchvision: 0.8.1+cpu

Bisides, torch 1.4.0 and torchvision 0.5.0 give the same error.