liferoad commented on code in PR #34379: URL: https://github.com/apache/beam/pull/34379#discussion_r2025290386
########## sdks/python/apache_beam/ml/inference/base.py: ########## @@ -339,6 +346,139 @@ def should_garbage_collect_on_timeout(self) -> bool: return self.share_model_across_processes() +class RemoteModelHandler(ABC, ModelHandler[ExampleT, PredictionT, ModelT]): + """Has the ability to call a model at a remote endpoint.""" + def __init__( Review Comment: just an idea to use config classes since the init arg list could be long (might be not): ``` from dataclasses import dataclass, field from typing import Callable @dataclass class RemoteModelHandlerConfig: namespace: str = '' num_retries: int = 5 throttle_delay_secs: int = 5 retry_filter: Callable[[Exception], bool] = field(default_factory=lambda: lambda x: True) window_ms: int = 1 * _MILLISECOND_TO_SECOND bucket_ms: int = 1 * _MILLISECOND_TO_SECOND overload_ratio: float = 2 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org