From 452ae24bc8b1c9a5a69418b8399222c48717fcdd Mon Sep 17 00:00:00 2001 From: Bryan Qiu Date: Thu, 26 Oct 2023 20:16:17 -0700 Subject: [PATCH] fix docs Signed-off-by: Bryan Qiu --- docs/source/python_api/mlflow.metrics.rst | 2 +- mlflow/models/evaluation/base.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/source/python_api/mlflow.metrics.rst b/docs/source/python_api/mlflow.metrics.rst index 8a4d6f525afc9..485c7e45ab30d 100644 --- a/docs/source/python_api/mlflow.metrics.rst +++ b/docs/source/python_api/mlflow.metrics.rst @@ -121,7 +121,7 @@ Parameters: each input query. ``retriever_k`` defaults to 3. You can change ``retriever_k`` by using the :py:func:`mlflow.evaluate` API: - 1. ``evaluator_config={"k": 5}`` + 1. ``evaluator_config={"retriever_k": 5}`` 2. .. code-block:: python extra_metrics = [ diff --git a/mlflow/models/evaluation/base.py b/mlflow/models/evaluation/base.py index b9236468982fa..b416be1507fe1 100644 --- a/mlflow/models/evaluation/base.py +++ b/mlflow/models/evaluation/base.py @@ -1354,10 +1354,11 @@ def evaluate( metrics. - **col_mapping**: A dictionary mapping column names in the input dataset or output predictions to column names used when invoking the evaluation functions. - - **k**: A parameter used when ``model_type="retriever"`` as the number of top-ranked - retrieved documents to use when computing the built-in metric :mod:`precision_at_k(k) - ` and :mod:`recall_at_k(k) `. - Default value is 3. For all other model types, this parameter will be ignored. + - **retriever_k**: A parameter used when ``model_type="retriever"`` as the number of + top-ranked retrieved documents to use when computing the built-in metric + :mod:`precision_at_k(k) ` and + :mod:`recall_at_k(k) `. Default value is 3. For all other + model types, this parameter will be ignored. - Limitations of evaluation dataset: - For classification tasks, dataset labels are used to infer the total number of classes.