From 10e7478a96ff8196489ce61e2bdac6750164bb2a Mon Sep 17 00:00:00 2001 From: Zhengfei Wang Date: Thu, 11 Apr 2024 23:42:25 +0800 Subject: [PATCH] fix: check tracer_provider type --- src/promptflow-devkit/promptflow/_sdk/_tracing.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/promptflow-devkit/promptflow/_sdk/_tracing.py b/src/promptflow-devkit/promptflow/_sdk/_tracing.py index 91e0b8c9c1d..969256d746f 100644 --- a/src/promptflow-devkit/promptflow/_sdk/_tracing.py +++ b/src/promptflow-devkit/promptflow/_sdk/_tracing.py @@ -54,7 +54,11 @@ def is_trace_feature_disabled() -> bool: from promptflow._sdk._configuration import Configuration - return Configuration.get_instance().get_trace_provider().lower() == PF_CONFIG_TRACE_FEATURE_DISABLE + trace_provider = Configuration.get_instance().get_trace_provider() + if isinstance(trace_provider, str): + return Configuration.get_instance().get_trace_provider().lower() == PF_CONFIG_TRACE_FEATURE_DISABLE + else: + return False def get_ws_tracing_base_url(ws_triad: AzureMLWorkspaceTriad) -> str: