    def close(self) -> None:
        """
        Called at the end of training to remove any module hooks and close out any
        other logging resources.
        """
        for handle in self._module_hook_handles:
            handle.remove()
Called at the end of training to remove any module hooks and close out any
other logging resources.
allennlp/training/callbacks/log_writer.py