MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / set_validator

Method set_validator

monai/handlers/validation_handler.py:58–64  ·  view source on GitHub ↗

Set validator if not setting in the __init__().

(self, validator: Evaluator)

Source from the content-addressed store, hash-verified

56 self.exec_at_start = exec_at_start
57
58 def set_validator(self, validator: Evaluator) -> None:
59 """
60 Set validator if not setting in the __init__().
61 """
62 if not isinstance(validator, Evaluator):
63 raise TypeError(f"validator must be a monai.engines.evaluator.Evaluator but is {type(validator).__name__}.")
64 self.validator = validator
65
66 def attach(self, engine: Engine) -> None:
67 """

Callers 1

Calls

no outgoing calls

Tested by 1