Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Torchserve 23mt v0.8.0 fix 1 #14

Merged
merged 32 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
f01868f
Updating index.md to fix 8 broken links (#2329)
sekyondaMeta May 15, 2023
25f3700
BERT nightly benchmark on Inferentia2 (#2283)
namannandan May 16, 2023
77ca82d
fix: kserve fastapi migration issues (#2175)
May 19, 2023
4450287
Fixing FAQs doc per issue #2204 (#2351)
sekyondaMeta May 22, 2023
4f85477
Micro batching example (#2210)
mreso May 25, 2023
63ebd4d
Install torch before other ts dependencies
mreso May 24, 2023
680b6fd
Make use of venv
mreso May 25, 2023
5f75710
move torch dependencies into separate file
mreso May 25, 2023
ffa6847
Remove deprecated pygit2 installation
mreso May 25, 2023
a568291
Avoid running processes in integration test
mreso Apr 1, 2023
d229611
Fix error case
mreso Apr 1, 2023
c816465
Remove test cross-talking
mreso Apr 3, 2023
81c3d59
Enable Regression Test in CI (#2370)
msaroufim May 30, 2023
130a29e
Fix regression test failures associated with fixes in PR: https://git…
namannandan May 31, 2023
1f863f9
Remove evil session_mocker usage to prevent test cross talking
mreso May 31, 2023
27a6ed5
Enable ONNX test in CI (#2363)
msaroufim May 31, 2023
c685b5c
Update cpuinfo (#2372)
min-jean-cho May 31, 2023
a81fc52
fix tcp port in model_service_worker.py (#2377)
lxning Jun 1, 2023
77f8c0b
Remove cu118 from regression tests (#2380)
agunapal Jun 1, 2023
e5004b2
Update cpuinfo (#2379)
min-jean-cho Jun 2, 2023
e205e6b
Upgrade torch, torchvision, torchtext and torchaudio versions (#2374)
namannandan Jun 2, 2023
9542c45
Remove wait time when stopping and starting torchserve in tests
mreso Mar 22, 2023
9a23ef7
Remove 10 second wait time for start/stop torchserve
mreso Mar 23, 2023
fe27e07
Prepare log folder + remove spaces in command + obsolete kwarg
mreso Jun 1, 2023
28a2525
Allow --stop to be combined with --forward argument to wait for model…
mreso Jun 1, 2023
08a9093
Ts type annotations (#2384)
josephcalise Jun 6, 2023
43d84ff
fix: reflect model config in config.properties (#2382)
lxning Jun 12, 2023
580c28a
Bump transformers from 4.28.1 to 4.30.0 in /requirements (#2410)
dependabot[bot] Jun 13, 2023
7f9967e
fix model cpu config (#2408)
lxning Jun 13, 2023
89fbd88
support jobQueueSize and job ticket per model in model config YAML (#…
lxning Jun 13, 2023
6eea9e1
Merge commit '89fbd885b11e4d2f40bea779d8cee7c6a87f9c20' of github.com…
simonschoelly Jun 13, 2023
f01fab6
Use /pytorch-serve insteaf of /serve directory in dockerfile
simonschoelly Jun 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/benchmark_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
hardware: [cpu, gpu, inf1]
hardware: [cpu, gpu, inf1, inf2]
runs-on:
- self-hosted
- ${{ matrix.hardware }}
Expand Down Expand Up @@ -52,6 +52,11 @@ jobs:
env:
NEURON_RT_NUM_CORES: 4
run: python benchmarks/auto_benchmark.py --input benchmarks/benchmark_config_neuron.yaml --skip false
- name: Benchmark inf2 nightly
if: ${{ matrix.hardware == 'inf2' }}
env:
NEURON_RT_NUM_CORES: 1
run: python benchmarks/auto_benchmark.py --input benchmarks/benchmark_config_neuronx.yaml --skip false
- name: Save benchmark artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/regression_tests_cpu.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
name: Run Regression Tests on CPU

on:
# runs everyday at 9:15am
schedule:
- cron: '15 9 * * *'
push:
branches:
- master
pull_request:
branches:
- master

concurrency:
group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

jobs:
regression-cpu:
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/regression_tests_gpu.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
name: Run Regression Tests on GPU

on:
# runs everyday at 9:15am
schedule:
- cron: '15 9 * * *'
push:
branches:
- master
pull_request:
branches:
- master

concurrency:
group: ci-cpu-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true

jobs:
regression-gpu:
# creates workflows for CUDA 11.6 & CUDA 11.7 on ubuntu
runs-on: [self-hosted, regression-test-gpu]
strategy:
fail-fast: false
matrix:
cuda: ["cu117", "cu118"]
steps:
- name: Clean up previous run
run: |
Expand Down Expand Up @@ -40,7 +43,7 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
run: |
python ts_scripts/install_dependencies.py --environment=dev --cuda=${{ matrix.cuda }}
python ts_scripts/install_dependencies.py --environment=dev --cuda=cu117
- name: Torchserve Regression Tests
run: |
python test/regression_tests.py
2 changes: 1 addition & 1 deletion benchmarks/auto_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def load_config(self):

self.bm_config["model_config_path"] = (
"{}/{}".format(MODEL_JSON_CONFIG_PATH, self.bm_config["hardware"])
if self.bm_config["hardware"] in ["cpu", "gpu", "neuron"]
if self.bm_config["hardware"] in ["cpu", "gpu", "neuron", "neuronx"]
else "{}/cpu".format(MODEL_JSON_CONFIG_PATH)
)

Expand Down
45 changes: 45 additions & 0 deletions benchmarks/benchmark_config_neuronx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Torchserve version is to be installed. It can be one of the options
# - branch : "master"
# - nightly: "2022.3.16"
# - release: "0.5.3"
# Nightly build will be installed if "ts_version" is not specifiged
#ts_version:
# branch: &ts_version "master"

# a list of model configure yaml files defined in benchmarks/models_config
# or a list of model configure yaml files with full path
models:
- "bert_neuronx.yaml"

# benchmark on "cpu", "gpu", "neuron" or "neuronx".
# "cpu" is set if "hardware" is not specified
hardware: &hardware "neuronx"

# load prometheus metrics report to remote storage or local different path if "metrics_cmd" is set.
# the command line to load prometheus metrics report to remote system.
# Here is an example of AWS cloudwatch command:
# Note:
# - keep the values order as the same as the command definition.
# - set up the command before enabling `metrics_cmd`.
# For example, aws client and AWS credentials need to be setup before trying this example.
metrics_cmd:
- "cmd": "aws cloudwatch put-metric-data"
- "--namespace": ["torchserve_benchmark_nightly_", *hardware]
- "--region": "us-east-2"
- "--metric-data": 'file:///tmp/benchmark/logs/stats_metrics.json'

# load report to remote storage or local different path if "report_cmd" is set.
# the command line to load report to remote storage.
# Here is an example of AWS cloudwatch command:
# Note:
# - keep the values order as the same as the command.
# - set up the command before enabling `report_cmd`.
# For example, aws client, AWS credentials and S3 bucket
# need to be setup before trying this example.
# - "today()" is a keyword to apply current date in the path
# For example, the dest path in the following example is
# s3://torchserve-model-serving/benchmark/2022-03-18/gpu
report_cmd:
- "cmd": "aws s3 cp --recursive"
- "source": '/tmp/ts_benchmark/'
- "dest": ['s3://torchserve-benchmark/nightly', "today()", *hardware]
68 changes: 68 additions & 0 deletions benchmarks/models_config/bert_neuronx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
bert_neuronx_batch_1:
scripted_mode:
benchmark_engine: "ab"
url: https://torchserve.pytorch.org/mar_files/BERTSeqClassification_torchscript_neuronx_batch_1.mar
workers:
- 2
batch_delay: 100
batch_size:
- 1
input: "./examples/Huggingface_Transformers/Seq_classification_artifacts/sample_text.txt"
requests: 10000
concurrency: 100
backend_profiling: False
exec_env: "local"
processors:
- "neuronx"

bert_neuronx_batch_2:
scripted_mode:
benchmark_engine: "ab"
url: https://torchserve.pytorch.org/mar_files/BERTSeqClassification_torchscript_neuronx_batch_2.mar
workers:
- 2
batch_delay: 100
batch_size:
- 2
input: "./examples/Huggingface_Transformers/Seq_classification_artifacts/sample_text.txt"
requests: 10000
concurrency: 100
backend_profiling: False
exec_env: "local"
processors:
- "neuronx"

bert_neuronx_batch_4:
scripted_mode:
benchmark_engine: "ab"
url: https://torchserve.pytorch.org/mar_files/BERTSeqClassification_torchscript_neuronx_batch_4.mar
workers:
- 2
batch_delay: 100
batch_size:
- 4
input: "./examples/Huggingface_Transformers/Seq_classification_artifacts/sample_text.txt"
requests: 10000
concurrency: 100
backend_profiling: False
exec_env: "local"
processors:
- "neuronx"

bert_neuronx_batch_8:
scripted_mode:
benchmark_engine: "ab"
url: https://torchserve.pytorch.org/mar_files/BERTSeqClassification_torchscript_neuronx_batch_8.mar
workers:
- 2
batch_delay: 100
batch_size:
- 8
input: "./examples/Huggingface_Transformers/Seq_classification_artifacts/sample_text.txt"
requests: 10000
concurrency: 100
backend_profiling: False
exec_env: "local"
processors:
- "neuronx"
6 changes: 4 additions & 2 deletions docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ RUN --mount=type=ssh if [ "$MACHINE_TYPE" = "gpu" ]; then export USE_CUDA=1; fi
&& git clone git@github.com:textshuttle/pytorch-serve.git \
&& cd pytorch-serve \
&& git checkout ${BRANCH_NAME} \
&& python$PYTHON_VERSION -m venv /home/venv \
&& python -m pip install -U pip setuptools \
&& python$PYTHON_VERSION -m venv /home/venv
ENV PATH="/home/venv/bin:$PATH"
WORKDIR pytorch-serve
RUN python -m pip install -U pip setuptools \
&& if [ -z "$CUDA_VERSION" ]; then python ts_scripts/install_dependencies.py --environment=dev; else python ts_scripts/install_dependencies.py --environment=dev --cuda $CUDA_VERSION; fi \
&& if [ "$BUILD_WITH_IPEX" = "true" ]; then python -m pip install --no-cache-dir intel_extension_for_pytorch==${IPEX_VERSION} -f ${IPEX_URL}; fi \
&& python ts_scripts/install_from_src.py --git-branch $BRANCH_NAME \
Expand Down
Loading