Closed HakkyuKim closed 1 year ago
In your config.properties you have install_py_dep_per_model=true
so make sure you're also passing in dependencies like captum in your requirements.txt
captum strikes again cc @agunapal
@msaroufim Hi, thanks for replying. I've already passed captum
in the dependecies. This is the requirements.txt
file that I've passed during mar archiving.
captum==0.6.0
certifi==2023.5.7
charset-normalizer==3.1.0
cmake==3.26.3
contourpy==1.0.7
cycler==0.11.0
Cython==0.29.34
filelock==3.12.0
fonttools==4.39.4
idna==3.4
Jinja2==3.1.2
kiwisolver==1.4.4
lit==16.0.3
MarkupSafe==2.1.2
matplotlib==3.7.1
mpmath==1.3.0
networkx==3.1
numpy==1.24.3
nvidia-cublas-cu11==11.10.3.66
nvidia-cuda-cupti-cu11==11.7.101
nvidia-cuda-nvrtc-cu11==11.7.99
nvidia-cuda-runtime-cu11==11.7.99
nvidia-cudnn-cu11==8.5.0.96
nvidia-cufft-cu11==10.9.0.58
nvidia-curand-cu11==10.2.10.91
nvidia-cusolver-cu11==11.4.0.1
nvidia-cusparse-cu11==11.7.4.91
nvidia-nccl-cu11==2.14.3
nvidia-nvtx-cu11==11.7.91
packaging==23.1
Pillow==9.3.0
psutil==5.9.5
pynvml==11.4.1
pyparsing==3.0.9
python-dateutil==2.8.2
PyYAML==6.0
requests==2.30.0
six==1.16.0
sympy==1.12
torch==2.0.0+cpu
torchaudio==2.0.1+cpu
torchdata==0.6.0
torchtext==0.15.1+cpu
torchvision==0.15.1+cpu
tqdm==4.65.0
triton==2.0.0
typing_extensions==4.5.0
urllib3==2.0.2
The current issue is not able to install torch==2.0.0+cpu
in worker?
2023-05-16T20:38:26,068 [ERROR] main org.pytorch.serve.wlm.ModelManager - Dependency installation stderr:
ERROR: Could not find a version that satisfies the requirement torch==2.0.0+cpu (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1)ERROR: No matching distribution found for torch==2.0.0+cpu
2023-05-16T20:38:26,068 [WARN ] main org.pytorch.serve.ModelServer - Failed to load model: resnet-18.mar
org.pytorch.serve.archive.model.ModelException: Custom pip package installation failed for resnet-18
at org.pytorch.serve.wlm.ModelManager.setupModelDependencies(ModelManager.java:258) ~[model-server.jar:?]
at org.pytorch.serve.wlm.ModelManager.registerModel(ModelManager.java:152) ~[model-server.jar:?]
at org.pytorch.serve.ModelServer.initModelStore(ModelServer.java:264) [model-server.jar:?]
at org.pytorch.serve.ModelServer.startRESTserver(ModelServer.java:396) [model-server.jar:?]
at org.pytorch.serve.ModelServer.startAndWait(ModelServer.java:118) [model-server.jar:?]
at org.pytorch.serve.ModelServer.main(ModelServer.java:99) [model-server.jar:?]
torch==2.0.0+cpu
had to be downloaded from a different index, https://download.pytorch.org/whl/cpu
.
Adding the --extra-index-url
line in requirements.txt
solved the problem. I'll close this.
# requirements.txt
--extra-index-url https://download.pytorch.org/whl/cpu
...
...
torch==2.0.1+cpu
torch-model-archiver==0.8.0
torch-workflow-archiver==0.2.8
torchaudio==2.0.2+cpu
torchserve==0.8.0
torchvision==0.15.2+cpu
...
...
🐛 Describe the bug
I'm trying to run the the torchserve resnet_18 example by following the README.
Environment
Steps
After cloning the serve repository,
Result
Calling prediction on a different terminal produces the following error.
Error log
Attempts to resolve the issue
It seems that mar file requires some dependencies so I've tried the following
Calling prediction on a different terminal produces different error.
By checking the terminal output, there seems to be a problem in downloading
torch==2.0.0+cpu
.I'm unable to proceed from here, does the example need to be fixed or am I doing something wrong here? (I've also tried the above steps without venv.)
Error logs
Error log has been added above.
Installation instructions
Did you install torchserve from source? Are you using Docker? NO and NO.
Model Packaing
config.properties
install_py_dep_per_model=true
Versions
Not sure why java version is not included. This is my java environment
Repro instructions
Written above.
Possible Solution
No response