-
Install dependencies (if not already installed) For CPU:
python ts_scripts/install_dependencies.py --environment=dev
For GPU
- Install dependencies (if not already installed)
python ts_scripts/install_dependencies.py --environment=dev --cuda=cu102
Supported cuda versions as cu118, cu117, cu116, cu113, cu111, cu102, cu101, cu92
-
Execute sanity suite
python ./torchserve_sanity.py
frontend/gradlew -p frontend clean build
TorchServe frontend build suite consists of :
- checkstyle
- findbugs
- PMD
- UT
The reports are generated at following path : frontend/server/build/reports
python -m pytest --cov-report html:htmlcov --cov=ts/ ts/tests/unit_tests/
The reports are generated at following path : htmlcov/
pylint -rn --rcfile=./ts/tests/pylintrc ts/.
cd model-archiver
python -m pytest --cov-report html:htmlcov_ut --cov=model_archiver/ model_archiver/tests/unit_tests/
The reports are generated at following path : model-archiver/htmlcov_ut/
cd model-archiver
pip install .
python -m pytest --cov-report html:htmlcov_it --cov=model_archiver/ model_archiver/tests/integ_tests/
The reports are generated at following path : model-archiver/htmlcov_it/
Note: All the above commands needs to be excuted from serve home
Run following commands to install node and markdown-link-check
npm package.
- Install node
For Linux :
sudo apt-get -y install nodejs-dev
sudo apt-get -y install npm
For Mac :
brew install node
brew install npm
- Install markdown
sudo npm install -g n
sudo npm install -g markdown-link-check
Execute this command to run markdown link checks locally. It will check broken links in all files with ".md" extension in current directory recursively.
for i in **/*.md; do markdown-link-check $i --config link_check_config.json; done;