From 2ad239fe28ac41e9fe79f593e79f72a8b8570445 Mon Sep 17 00:00:00 2001 From: David Gardner Date: Tue, 26 Dec 2023 09:35:07 -0800 Subject: [PATCH] Lint fixes --- examples/log_parsing/run.py | 1 - morpheus/stages/inference/triton_inference_stage.py | 2 +- tests/examples/log_parsing/test_inference.py | 6 ++++-- tests/examples/log_parsing/test_postprocessing.py | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/log_parsing/run.py b/examples/log_parsing/run.py index d241e69a4f..b272a4625b 100644 --- a/examples/log_parsing/run.py +++ b/examples/log_parsing/run.py @@ -19,7 +19,6 @@ from postprocessing import LogParsingPostProcessingStage from morpheus.config import Config -from morpheus.config import CppConfig from morpheus.config import PipelineModes from morpheus.pipeline import LinearPipeline from morpheus.stages.general.monitor_stage import MonitorStage diff --git a/morpheus/stages/inference/triton_inference_stage.py b/morpheus/stages/inference/triton_inference_stage.py index 513a7b760f..e15fcfc9b0 100644 --- a/morpheus/stages/inference/triton_inference_stage.py +++ b/morpheus/stages/inference/triton_inference_stage.py @@ -733,7 +733,7 @@ def supports_cpp_node(self) -> bool: def _get_inference_worker(self, inf_queue: ProducerConsumerQueue) -> TritonInferenceWorker: """ - Returns the worker for this stage. Authors of custom sub-classes can override this method to provide a custom + Returns the worker for this stage. Authors of custom sub-classes can override this method to provide a custom worker. """ diff --git a/tests/examples/log_parsing/test_inference.py b/tests/examples/log_parsing/test_inference.py index 37bdc45e21..928689aa5d 100644 --- a/tests/examples/log_parsing/test_inference.py +++ b/tests/examples/log_parsing/test_inference.py @@ -259,5 +259,7 @@ def test_log_parsing_inference_stage_convert_one_response(import_mod: typing.Lis tensors = resp_msg.memory.get_tensors() for (tensor_name, tensor) in tensors.items(): orig_tensor = orig_tensors[tensor_name] - assert (tensor[0:offset] == orig_tensor[0:offset]).all(), f"Out of bounds values for {tensor_name}" - assert (tensor[offset + count:] == orig_tensor[offset + count:]).all(), f"Out of bounds values for {tensor_name}" + + error_msg = f"Out of bounds values for {tensor_name}" + assert (tensor[0:offset] == orig_tensor[0:offset]).all(), error_msg + assert (tensor[offset + count:] == orig_tensor[offset + count:]).all(), error_msg diff --git a/tests/examples/log_parsing/test_postprocessing.py b/tests/examples/log_parsing/test_postprocessing.py index ea09727d19..49d108d2c3 100644 --- a/tests/examples/log_parsing/test_postprocessing.py +++ b/tests/examples/log_parsing/test_postprocessing.py @@ -24,9 +24,9 @@ from _utils import TEST_DIRS from _utils.dataset_manager import DatasetManager from morpheus.config import Config -from morpheus.messages import TensorMemory from morpheus.messages import MessageMeta from morpheus.messages import MultiResponseMessage +from morpheus.messages import TensorMemory def build_post_proc_message(dataset_cudf: DatasetManager, log_test_data_dir: str):