Skip to content

Test config change #120

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 12 additions & 12 deletions src/sagemaker_pytorch_serving_container/torchserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,18 @@ def _generate_ts_config_properties(handler_service):
ts_env = ts_environment.TorchServeEnvironment()

if ts_env.is_env_set() and not ENABLE_MULTI_MODEL:
models_string = f'''{{\\
"{DEFAULT_TS_MODEL_NAME}": {{\\
"1.0": {{\\
"defaultVersion": true,\\
"marName": "{DEFAULT_TS_MODEL_NAME}.mar",\\
"minWorkers": {ts_env._min_workers},\\
"maxWorkers": {ts_env._max_workers},\\
"batchSize": {ts_env._batch_size},\\
"maxBatchDelay": {ts_env._max_batch_delay},\\
"responseTimeout": {ts_env._response_timeout}\\
}}\\
}}\\
models_string = f'''{{\\\n
"{DEFAULT_TS_MODEL_NAME}": {{\\\n
"1.0": {{\\\n
"defaultVersion": true,\\\n
"marName": "{DEFAULT_TS_MODEL_NAME}.mar",\\\n
"minWorkers": {ts_env._min_workers},\\\n
"maxWorkers": {ts_env._max_workers},\\\n
"batchSize": {ts_env._batch_size},\\\n
"maxBatchDelay": {ts_env._max_batch_delay},\\\n
"responseTimeout": {ts_env._response_timeout}\\\n
}}\\\n
}}\\\n
}}'''
user_defined_configuration["models"] = models_string
logger.warn("Sagemaker TS environment variables have been set and will be used "
Expand Down
3 changes: 0 additions & 3 deletions test/container/1.10.2/Dockerfile.dlc.cpu
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
ARG region
FROM 763104351884.dkr.ecr.$region.amazonaws.com/pytorch-inference:1.10.2-cpu-py38-ubuntu20.04-sagemaker

RUN pip uninstall torchserve -y && \
pip install torchserve-nightly==2022.3.23.post2

COPY dist/sagemaker_pytorch_inference-*.tar.gz /sagemaker_pytorch_inference.tar.gz
RUN pip install --upgrade --no-cache-dir /sagemaker_pytorch_inference.tar.gz && \
rm /sagemaker_pytorch_inference.tar.gz
3 changes: 0 additions & 3 deletions test/container/1.10.2/Dockerfile.dlc.gpu
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
ARG region
FROM 763104351884.dkr.ecr.$region.amazonaws.com/pytorch-inference:1.10.2-gpu-py38-cu113-ubuntu20.04-sagemaker

RUN pip uninstall torchserve -y && \
pip install torchserve-nightly==2022.3.23.post2

COPY dist/sagemaker_pytorch_inference-*.tar.gz /sagemaker_pytorch_inference.tar.gz
RUN pip install --upgrade --no-cache-dir /sagemaker_pytorch_inference.tar.gz && \
rm /sagemaker_pytorch_inference.tar.gz