Skip to content

Commit

Permalink
Make validate_constructor_args local to pytorch handler
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandInguva committed Feb 10, 2023
1 parent fbdfe59 commit e5c9062
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
6 changes: 0 additions & 6 deletions sdks/python/apache_beam/ml/inference/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,6 @@ def update_model_path(self, model_path: Optional[str] = None):
"""Update the model paths produced by side inputs."""
pass

def validate_constructor_args(self):
"""
Validate arguments passed to the ModelHandler constructor.
"""
raise NotImplementedError


class KeyedModelHandler(Generic[KeyT, ExampleT, PredictionT, ModelT],
ModelHandler[Tuple[KeyT, ExampleT],
Expand Down
7 changes: 0 additions & 7 deletions sdks/python/apache_beam/ml/inference/pytorch_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,6 @@ def __init__(
self._batching_kwargs['max_batch_size'] = max_batch_size
self._torch_script_model_path = torch_script_model_path

self.validate_constructor_args()

def validate_constructor_args(self):
_validate_constructor_args(
state_dict_path=self._state_dict_path,
model_class=self._model_class,
Expand Down Expand Up @@ -462,10 +459,6 @@ def __init__(
if max_batch_size is not None:
self._batching_kwargs['max_batch_size'] = max_batch_size
self._torch_script_model_path = torch_script_model_path

self.validate_constructor_args()

def validate_constructor_args(self):
_validate_constructor_args(
state_dict_path=self._state_dict_path,
model_class=self._model_class,
Expand Down

0 comments on commit e5c9062

Please sign in to comment.