Skip to content

Commit

Permalink
Add tracing section in 'mlflow.' Python API page for better visibility (
Browse files Browse the repository at this point in the history
#12281)

Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: Yuki Watanabe <31463517+B-Step62@users.noreply.github.com>
Co-authored-by: Harutaka Kawamura <hkawamura0130@gmail.com>
  • Loading branch information
B-Step62 and harupy committed Jun 7, 2024
1 parent 669be34 commit 100b694
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docs/source/python_api/mlflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,32 @@ mlflow
.. automodule:: mlflow
:members:
:undoc-members:
:exclude-members: MlflowClient
:exclude-members: MlflowClient, trace, start_span, get_trace, search_traces, get_current_active_span, get_last_active_trace


.. _mlflow-tracing-fluent-python-apis:

MLflow Tracing APIs
===================

.. warning::

The tracing functionality is experimental and currently only available in Databricks. The feature will be fully supported in open-source MLflow in 2.14.0.

The ``mlflow`` module provides a set of high-level APIs for `MLflow Tracing <../llms/tracing/index.html>`_. For the detailed
guidance on how to use these tracing APIs, please refer to the `Tracing Fluent APIs Guide <../llms/tracing/index.html#tracing-fluent-apis>`_.

For some advanced use cases such as multi-threaded application, instrumentation via callbacks, you may need to use
the low-level tracing APIs :py:class:`MlflowClient <mlflow.client.MlflowClient>` provides.
For detailed guidance on how to use the low-level tracing APIs, please refer to the `Tracing Client APIs Guide <../llms/tracing/index.html#tracing-client-apis>`_.

.. autofunction:: mlflow.trace
.. autofunction:: mlflow.start_span
.. autofunction:: mlflow.get_trace
.. autofunction:: mlflow.search_traces
.. autofunction:: mlflow.get_current_active_span
.. autofunction:: mlflow.get_last_active_trace
.. automodule:: mlflow.tracing
:members:
:undoc-members:
:noindex:
10 changes: 10 additions & 0 deletions docs/source/python_api/mlflow.tracing.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
mlflow.tracing
==============

.. warning::

The tracing functionality is experimental and currently only available in Databricks. The feature will be fully supported in open-source MLflow in next major release.

.. attention::

The ``mlflow.tracing`` namespace only contains a few utility functions fo managing traces. The main entry point for MLflow
Tracing is :ref:`Tracing Fluent APIs <mlflow-tracing-fluent-python-apis>` defined directly under the
:py:mod:`mlflow` namespace, or the low-level `Tracing Client APIs <../llms/tracing/index.html#tracing-client-apis>`_

.. automodule:: mlflow.tracing
:members:
:undoc-members:
Expand Down

0 comments on commit 100b694

Please sign in to comment.