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

Method attach

monai/handlers/logfile_handler.py:65–68  ·  view source on GitHub ↗
(self, engine: Engine)

Source from the content-addressed store, hash-verified

63 self.handler: logging.FileHandler | None = None
64
65 def attach(self, engine: Engine) -> None:
66 self.logger = engine.logger
67 engine.add_event_handler(Events.STARTED, self._start)
68 engine.add_event_handler(Events.COMPLETED, self._completed)
69
70 def _start(self, engine: Engine) -> None:
71 if self.create_dir and not os.path.exists(self.output_dir):

Callers 3

test_logfileMethod · 0.95
test_filenameMethod · 0.95
test_createdirMethod · 0.95

Calls

no outgoing calls

Tested by 3

test_logfileMethod · 0.76
test_filenameMethod · 0.76
test_createdirMethod · 0.76