From bcfd86b2bce7c4931b863063535490d40d35cccc Mon Sep 17 00:00:00 2001 From: Billy Hu Date: Tue, 7 Jan 2025 09:40:59 -0800 Subject: [PATCH] Disable tracing in Promptflow by default --- .pre-commit-config.yaml | 6 ------ src/promptflow-core/promptflow/executor/flow_executor.py | 2 +- src/promptflow-tracing/promptflow/tracing/_utils.py | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1f883b7d45c..e01af824d3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,9 +44,3 @@ repos: # Use black profile for isort to avoid conflicts # see https://github.com/PyCQA/isort/issues/1518 args: ["--profile", "black", --line-length=120] - - repo: https://github.com/pylint-dev/pylint - rev: v3.0.3 - hooks: - - id: pylint - name: pylint - args: [ --rcfile=pylintrc, --output-format=parseable ] diff --git a/src/promptflow-core/promptflow/executor/flow_executor.py b/src/promptflow-core/promptflow/executor/flow_executor.py index 472da04d288..f5d1f4d1d9b 100644 --- a/src/promptflow-core/promptflow/executor/flow_executor.py +++ b/src/promptflow-core/promptflow/executor/flow_executor.py @@ -882,7 +882,7 @@ def _get_node_referenced_flow_inputs( @staticmethod def _tracing_disabled(): - return os.environ.get("PF_DISABLE_TRACING", "false").lower() == "true" + return os.environ.get("PF_DISABLE_TRACING", "true").lower() == "true" @contextlib.contextmanager def _start_flow_span(self, inputs: Mapping[str, Any]): diff --git a/src/promptflow-tracing/promptflow/tracing/_utils.py b/src/promptflow-tracing/promptflow/tracing/_utils.py index 44fc400af1a..7006b5288a7 100644 --- a/src/promptflow-tracing/promptflow/tracing/_utils.py +++ b/src/promptflow-tracing/promptflow/tracing/_utils.py @@ -9,7 +9,7 @@ def is_tracing_disabled(): - return os.environ.get("PF_DISABLE_TRACING", "false").lower() == "true" + return os.environ.get("PF_DISABLE_TRACING", "true").lower() == "true" def serialize(value: object, remove_null: bool = False, serialization_funcs: Dict[type, Callable] = None) -> dict: