diff --git a/src/c++/perf_analyzer/genai-perf/genai_perf/llm_inputs/synthetic_image_generator.py b/src/c++/perf_analyzer/genai-perf/genai_perf/llm_inputs/synthetic_image_generator.py index 167578b95..a79832cf0 100644 --- a/src/c++/perf_analyzer/genai-perf/genai_perf/llm_inputs/synthetic_image_generator.py +++ b/src/c++/perf_analyzer/genai-perf/genai_perf/llm_inputs/synthetic_image_generator.py @@ -1,11 +1,9 @@ import base64 from enum import Enum, auto from io import BytesIO -from pathlib import Path -from typing import Generator, Optional, Tuple, cast +from typing import Optional, cast import numpy as np -from genai_perf.exceptions import GenAIPerfException from PIL import Image @@ -29,7 +27,7 @@ def __init__( self._image_width_stddev = image_width_stddev self._image_height_stddev = image_height_stddev self.image_format = image_format - self.rng = rng or np.random.default_rng() + self.rng = cast(np.random.Generator, rng or np.random.default_rng()) def __iter__(self): return self diff --git a/src/c++/perf_analyzer/genai-perf/tests/test_synthetic_image_generator.py b/src/c++/perf_analyzer/genai-perf/tests/test_synthetic_image_generator.py index d61e52f21..16fb5b6f6 100644 --- a/src/c++/perf_analyzer/genai-perf/tests/test_synthetic_image_generator.py +++ b/src/c++/perf_analyzer/genai-perf/tests/test_synthetic_image_generator.py @@ -1,11 +1,8 @@ import base64 from io import BytesIO -from pathlib import Path -from unittest.mock import patch import numpy as np import pytest -from genai_perf.exceptions import GenAIPerfException from genai_perf.llm_inputs.synthetic_image_generator import ( ImageFormat, SyntheticImageGenerator,