From 8d7ca9b798bd39a627f4724e56fe29ad32bcaeae Mon Sep 17 00:00:00 2001 From: Daniel Lok Date: Wed, 18 Dec 2024 15:23:44 +0800 Subject: [PATCH] comments Signed-off-by: Daniel Lok --- mlflow/entities/trace.py | 4 +- mlflow/tracing/display/__init__.py | 4 +- mlflow/tracing/display/display_handler.py | 51 +++++++++++------------ tests/tracing/display/test_ipython.py | 6 +-- 4 files changed, 31 insertions(+), 34 deletions(-) diff --git a/mlflow/entities/trace.py b/mlflow/entities/trace.py index 6ee1a03512927..1a14e8e51cc31 100644 --- a/mlflow/entities/trace.py +++ b/mlflow/entities/trace.py @@ -83,8 +83,8 @@ def _repr_mimebundle_(self, include=None, exclude=None): in Databricks notebooks to display the Trace object in a nicer UI. """ from mlflow.tracing.display import ( - _get_notebook_iframe_html, get_display_handler, + get_notebook_iframe_html, is_using_tracking_server, ) from mlflow.utils.databricks_utils import is_in_databricks_runtime @@ -95,7 +95,7 @@ def _repr_mimebundle_(self, include=None, exclude=None): if is_in_databricks_runtime(): bundle["application/databricks.mlflow.trace"] = self._serialize_for_mimebundle() elif is_using_tracking_server(): - bundle["text/html"] = _get_notebook_iframe_html([self]) + bundle["text/html"] = get_notebook_iframe_html([self]) return bundle diff --git a/mlflow/tracing/display/__init__.py b/mlflow/tracing/display/__init__.py index 44f1a47657c8e..011f722ba7ffa 100644 --- a/mlflow/tracing/display/__init__.py +++ b/mlflow/tracing/display/__init__.py @@ -1,6 +1,6 @@ from mlflow.tracing.display.display_handler import ( IPythonTraceDisplayHandler, - _get_notebook_iframe_html, + get_notebook_iframe_html, is_using_tracking_server, ) @@ -8,7 +8,7 @@ "IPythonTraceDisplayHandler", "get_display_handler", "is_using_tracking_server", - "_get_notebook_iframe_html", + "get_notebook_iframe_html", ] diff --git a/mlflow/tracing/display/display_handler.py b/mlflow/tracing/display/display_handler.py index 0584aa9965da8..649a344d4e431 100644 --- a/mlflow/tracing/display/display_handler.py +++ b/mlflow/tracing/display/display_handler.py @@ -37,11 +37,14 @@ }}