Skip to content

Commit

Permalink
Replace ensemble_model with executor_model (#772)
Browse files Browse the repository at this point in the history
Co-authored-by: Julio Perez <37191411+jperez999@users.noreply.github.com>
  • Loading branch information
oliverholworthy and jperez999 authored Dec 20, 2022
1 parent f0842d3 commit 008be2f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@
"│ ├─1/\n",
"│ │ └─model.py\n",
"│ └─config.pbtxt\n",
"└─ensemble_model/\n",
"└─executor_model/\n",
" ├─1/\n",
" └─config.pbtxt\n"
]
Expand Down
14 changes: 7 additions & 7 deletions examples/sagemaker-tensorflow/sagemaker-merlin-tensorflow.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -956,9 +956,9 @@
"1_predicttensorflow/1/model.savedmodel/variables/variables.data-00000-of-00001\n",
"1_predicttensorflow/1/model.savedmodel/saved_model.pb\n",
"1_predicttensorflow/1/model.savedmodel/keras_metadata.pb\n",
"ensemble_model/\n",
"ensemble_model/config.pbtxt\n",
"ensemble_model/1/\n",
"executor_model/\n",
"executor_model/config.pbtxt\n",
"executor_model/1/\n",
"0_transformworkflow/\n",
"0_transformworkflow/config.pbtxt\n",
"0_transformworkflow/1/\n",
Expand Down Expand Up @@ -999,7 +999,7 @@
"\n",
"Although we use the Sagemaker Python SDK to train our model, here we will use `boto3` to launch our inference endpoint as it offers more low-level control than the Python SDK.\n",
"\n",
"The model artificat `model.tar.gz` uploaded to S3 from the Sagemaker training job contained three directories: `0_transformworkflow` for the NVTabular workflow, `1_predicttensorflow` for the Tensorflow model, and `ensemble_model` for the ensemble graph that we can use in Triton.\n",
"The model artificat `model.tar.gz` uploaded to S3 from the Sagemaker training job contained three directories: `0_transformworkflow` for the NVTabular workflow, `1_predicttensorflow` for the Tensorflow model, and `executor_model` for the ensemble graph that we can use in Triton.\n",
"\n",
"```shell\n",
"/tmp/ensemble/\n",
Expand Down Expand Up @@ -1037,13 +1037,13 @@
"│ │ ├── variables.data-00000-of-00001\n",
"│ │ └── variables.index\n",
"│ └── config.pbtxt\n",
"├── ensemble_model\n",
"├── executor_model\n",
"│ ├── 1\n",
"│ └── config.pbtxt\n",
"└── model.tar.gz\n",
"```\n",
"\n",
"We specify that we only want to use `ensemble_model` in Triton by passing the environment variable `SAGEMAKER_TRITON_DEFAULT_MODEL_NAME`."
"We specify that we only want to use `executor_model` in Triton by passing the environment variable `SAGEMAKER_TRITON_DEFAULT_MODEL_NAME`."
]
},
{
Expand Down Expand Up @@ -1072,7 +1072,7 @@
" \"ModelDataUrl\": estimator.model_data,\n",
" \"Environment\": {\n",
" \"SAGEMAKER_TRITON_TENSORFLOW_VERSION\": \"2\",\n",
" \"SAGEMAKER_TRITON_DEFAULT_MODEL_NAME\": \"ensemble_model\",\n",
" \"SAGEMAKER_TRITON_DEFAULT_MODEL_NAME\": \"executor_model\",\n",
" },\n",
"}\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
"source": [
"# send request to tritonserver\n",
"with grpcclient.InferenceServerClient(\"localhost:8001\") as client:\n",
" response = client.infer(\"ensemble_model\", inputs, request_id=\"1\", outputs=outputs)"
" response = client.infer(\"executor_model\", inputs, request_id=\"1\", outputs=outputs)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_func():
request = make_df({"user_id_raw": [100]})
request["user_id_raw"] = request["user_id_raw"].astype(np.int32)
response = run_ensemble_on_tritonserver(
"/tmp/examples/poc_ensemble", ensemble.graph.input_schema, request, outputs, "ensemble_model"
"/tmp/examples/poc_ensemble", ensemble.graph.input_schema, request, outputs, "executor_model"
)
response = [x.tolist()[0] for x in response["ordered_ids"]]
shutil.rmtree("/tmp/examples/", ignore_errors=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_func():
)
from merlin.systems.triton.utils import run_ensemble_on_tritonserver
response = run_ensemble_on_tritonserver(
"/tmp/examples/poc_ensemble", ensemble.graph.input_schema, batch, outputs, "ensemble_model"
"/tmp/examples/poc_ensemble", ensemble.graph.input_schema, batch, outputs, "executor_model"
)
response = [x.tolist()[0] for x in response["ordered_ids"]]
shutil.rmtree("/tmp/examples/", ignore_errors=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/examples/test_scaling_criteo_merlin_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_func():
outputs = ensemble.output_schema.column_names
response = run_ensemble_on_tritonserver(
"/tmp/output/criteo/ensemble/",workflow.input_schema, batch.fillna(0),
outputs, "ensemble_model"
outputs, "executor_model"
)
response = [x.tolist()[0] for x in response["label/binary_classification_task"]]
shutil.rmtree("/tmp/input/criteo", ignore_errors=True)
Expand Down

0 comments on commit 008be2f

Please sign in to comment.