Skip to content

Commit

Permalink
fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
cwharris committed Aug 23, 2024
1 parent 7d385d8 commit 11118c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/morpheus/morpheus/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ def model_max_batch_size(self, value: int):

def _validate_config(self):
if self._pipeline_batch_size < self._model_max_batch_size:
warnings.warn("Config has `pipeline_batch_size < model_max_batch_size` which effectively limits `model_max_batch_size`. This may reduce performance.")
warnings.warn(
"Config has `pipeline_batch_size < model_max_batch_size` which effectively limits `model_max_batch_size`. This may reduce performance."
)

def save(self, filename: str):
"""
Expand Down
3 changes: 3 additions & 0 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import json
import os
from unittest import mock

import pytest

import morpheus
Expand Down Expand Up @@ -106,12 +107,14 @@ def test_to_string(config):
assert isinstance(conf_str, str)
assert isinstance(json.loads(conf_str), dict)


def test_warning_model_batch_size_less_than_pipeline_batch_size():
config = morpheus.config.Config()
config.pipeline_batch_size = 256
with pytest.warns():
config.model_max_batch_size = 257


def test_warning_pipeline_batch_size_less_than_model_batch_size():
config = morpheus.config.Config()
config.model_max_batch_size = 8
Expand Down

0 comments on commit 11118c1

Please sign in to comment.