Torchserve Dashboard
Torchserve Dashboard using Streamlit
Related blog post
Usage
Additional Requirement: torchserve (recommended:v0.5.3, supports: v0.6.0)
Simply run:
pip3 install torchserve-dashboard --user
# torchserve-dashboard [streamlit_options(optional)] -- [config_path(optional)] [model_store(optional)] [log_location(optional)] [metrics_location(optional)]
torchserve-dashboard
#OR change port
torchserve-dashboard --server.port 8105 -- --config_path ./torchserve.properties
#OR provide a custom configuration
torchserve-dashboard -- --config_path ./torchserve.properties --model_store ./model_store
❗ Keep in mind that If you change any of the --config_path,--model_store,--metrics_location,--log_location options while there is a torchserver already running before starting torch-dashboard they won't come into effect until you stop&start torchserve. These options are used instead of their respective environment variables TS_CONFIG_FILE, METRICS_LOCATION, LOG_LOCATION.
OR
git clone https://github.com/cceyda/torchserve-dashboard.git
streamlit run torchserve_dashboard/dash.py
#OR
streamlit run torchserve_dashboard/dash.py --server.port 8105 -- --config_path ./torchserve.properties
Example torchserve config:
inference_address=http://127.0.0.1:8443
management_address=http://127.0.0.1:8444
metrics_address=http://127.0.0.1:8445
grpc_inference_port=7070
grpc_management_port=7071
number_of_gpu=0
batch_size=1
model_store=./model_store
If the server doesn't start for some reason check if your ports are already in use!
Updates
[15-oct-2020] add scale workers tab
[16-feb-2021] (functionality) make logpath configurable,(functionality)remove model_name requirement,(UI)add cosmetic error messages
[10-may-2021] update config & make it optional. update streamlit. Auto create folders
[31-may-2021] Update to v0.4 (Add workflow API) Refactor out streamlit from api.py.
[30-nov-2021] Update to v0.5, adding support for encrypted model serving (not tested). Update streamlit to v1+
FAQs
-
Does torchserver keep running in the background?
The torchserver is spawned using
Popenand keeps running in the background even if you stop the dashboard. -
What about environment variables?
These environment variables are passed to the torchserve command:
ENVIRON_WHITELIST=["LD_LIBRARY_PATH","LC_CTYPE","LC_ALL","PATH","JAVA_HOME","PYTHONPATH","TS_CONFIG_FILE","LOG_LOCATION","METRICS_LOCATION","AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY", "AWS_DEFAULT_REGION"] -
How to change the logging format of torchserve?
You can set the location of your custom log4j2 config in your configuration file as in here
vmargs=-Dlog4j.configurationFile=file:///path/to/custom/log4j2.xml -
What is the meaning behind the weird versioning?
The minor follows the compatible torchserve version, patch version reflects the dashboard versioning
Help & Question & Feedback
Open an issue
TODOs
- Async?
- Better logging
- Remote only mode
Metadata
Release files for torchserve-dashboard 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| torchserve_dashboard-0.6.0.tar.gz | 13.3 kB | Without provenance | Details for torchserve_dashboard-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torchserve_dashboard-0.6.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for torchserve_dashboard-0.6.0-py2.py3-none-any.whl |
Total release size: 25.7 kB
Release files / torchserve_dashboard-0.6.0.tar.gz
| Download URL | torchserve_dashboard-0.6.0.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4f0da6bf8fd4c3232972aaa3a824de74c8f726bb996fd1729c11c941b918115
|
|
BLAKE2b-256 checksum How to use checksums |
26d09a40db357fbaf989c0c0912470b605d92efc31b8e1bc122dcf3f67623e4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Release files / torchserve_dashboard-0.6.0-py2.py3-none-any.whl
| Download URL | torchserve_dashboard-0.6.0-py2.py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e0ee0ad1302a715e0b33d0a569a9cd1cd06dd9caaeeaf983bf4b91e59ad4a521
|
|
BLAKE2b-256 checksum How to use checksums |
0c299c58b0276db0df391de232f6034c9e6caea22061ea7842962b506360511d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Security for torchserve-dashboard 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.