Skip to content

Commit

Permalink
Merge pull request #1110 from openvinotoolkit/ashwin/fix_test
Browse files Browse the repository at this point in the history
[Anomaly Task] Add additional check for early stopping parameter
  • Loading branch information
sstrehlk authored May 16, 2022
2 parents 96913c2 + 7777c23 commit 2f9d792
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion external/anomaly/tests/test_ote_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _run_ote_training(self, data_collector):

logger.debug("Set hyperparameters")
params = ote_sdk_configuration_helper_create(self.model_template.hyper_parameters.data)
if hasattr(params, "model"):
if hasattr(params, "model") and hasattr(params.model, "early_stopping"):
if self.num_training_iters != KEEP_CONFIG_FIELD_VALUE:
params.model.early_stopping.patience = int(self.num_training_iters)
logger.debug(f"Set params.model.early_stopping.patience=" f"{params.model.early_stopping.patience}")
Expand Down

0 comments on commit 2f9d792

Please sign in to comment.