From 095997492008f332a063ccc0086b4aac000c6218 Mon Sep 17 00:00:00 2001 From: Alex Burlacu Date: Thu, 24 Aug 2023 13:55:05 +0300 Subject: [PATCH] Fix fastAI binding not reporting scalars if tensorboard is installed --- clearml/binding/frameworks/fastai_bind.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clearml/binding/frameworks/fastai_bind.py b/clearml/binding/frameworks/fastai_bind.py index 82bb2bd0..9f113e6b 100644 --- a/clearml/binding/frameworks/fastai_bind.py +++ b/clearml/binding/frameworks/fastai_bind.py @@ -8,6 +8,7 @@ from . import _patched_call from .tensorflow_bind import WeightsGradientHistHelper from ..import_bind import PostImportHookPatching from ...debugging.log import LoggerRoot +from .tensorflow_bind import IsTensorboardInit try: import fastai @@ -51,7 +52,7 @@ class PatchFastaiV1(object): @staticmethod def patch_model_callback(): # if you have tensorboard, we assume you use TensorboardLogger, which we catch, so no need to patch. - if "tensorboard" in sys.modules: + if "tensorboard" in sys.modules and IsTensorboardInit.tensorboard_used(): return try: @@ -191,7 +192,7 @@ class PatchFastaiV2(object): @staticmethod def patch_model_callback(): - if "tensorboard" in sys.modules: + if "tensorboard" in sys.modules and IsTensorboardInit.tensorboard_used(): return # noinspection PyBroadException