From cd69fc555f352873050a126d4b1e5e34e43e5754 Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Thu, 5 Jan 2023 08:21:12 +0800 Subject: [PATCH] Update log level for structured dataset (#1394) Signed-off-by: Kevin Su --- flytekit/types/structured/structured_dataset.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flytekit/types/structured/structured_dataset.py b/flytekit/types/structured/structured_dataset.py index f0fd917340..ec6b367c20 100644 --- a/flytekit/types/structured/structured_dataset.py +++ b/flytekit/types/structured/structured_dataset.py @@ -483,9 +483,10 @@ def register_for_protocol( if (default_format_for_type or default_for_type) and h.supported_format != GENERIC_FORMAT: if h.python_type in cls.DEFAULT_FORMATS and not override: - logger.warning( - f"Not using handler {h} with format {h.supported_format} as default for {h.python_type}, {cls.DEFAULT_FORMATS[h.python_type]} already specified." - ) + if cls.DEFAULT_FORMATS[h.python_type] != h.supported_format: + logger.debug( + f"Not using handler {h} with format {h.supported_format} as default for {h.python_type}, {cls.DEFAULT_FORMATS[h.python_type]} already specified." + ) else: logger.debug( f"Setting format {h.supported_format} for dataframes of type {h.python_type} from handler {h}" @@ -493,7 +494,7 @@ def register_for_protocol( cls.DEFAULT_FORMATS[h.python_type] = h.supported_format if default_storage_for_type or default_for_type: if h.protocol in cls.DEFAULT_PROTOCOLS and not override: - logger.warning( + logger.debug( f"Not using handler {h} with storage protocol {h.protocol} as default for {h.python_type}, {cls.DEFAULT_PROTOCOLS[h.python_type]} already specified." ) else: