MCPcopy Index your code
hub / github.com/tensorflow/models / _require

Method _require

orbit/controller.py:569–574  ·  view source on GitHub ↗

Utility method to raise an error if the given `attribute` is not set.

(self, attribute, for_method)

Source from the content-addressed store, hash-verified

567 return False
568
569 def _require(self, attribute, for_method):
570 """Utility method to raise an error if the given `attribute` is not set."""
571 if getattr(self, attribute, None) is None:
572 raise ValueError(
573 f"`{attribute}` is not set. Pass `{attribute}` to "
574 f"`Controller.__init__` before calling `{for_method}()`.")
575
576 def _sync_on_async_checkpointing(self):
577 """Force to wait for the async checkpoint saving (if any) to finish."""

Callers 6

trainMethod · 0.95
evaluateMethod · 0.95
train_and_evaluateMethod · 0.95
evaluate_continuouslyMethod · 0.95
restore_checkpointMethod · 0.95
save_checkpointMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected