We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Convert `. code-block:: python` to `.. test-code-block:: python` in `mlflow/tracking/_model_registry/fluent.py`
See #7457 for more information.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mlflow/tracking/_model_registry/fluent.py`
Content:
```
1 from mlflow.tracking.client import MlflowClient
2 from mlflow.exceptions import MlflowException
3 from mlflow.entities.model_registry import ModelVersion
4 from mlflow.entities.model_registry import RegisteredModel
5 from mlflow.protos.databricks_pb2 import RESOURCE_ALREADY_EXISTS, ErrorCode
6 from mlflow.store.artifact.runs_artifact_repo import RunsArtifactRepository
7 from mlflow.utils.logging_utils import eprint
8 from mlflow.utils import get_results_from_paginated_fn
9 from mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS
10 from mlflow.store.model_registry import SEARCH_REGISTERED_MODEL_MAX_RESULTS_DEFAULT
11 from typing import Any, Dict, Optional, List
12 
13 
14 def register_model(
15     model_uri,
16     name,
17     await_registration_for=DEFAULT_AWAIT_MAX_SLEEP_SECONDS,
18     *,
19     tags: Optional[Dict[str, Any]] = None,
20 ) -> ModelVersion:
21     """
22     Create a new model version in model registry for the model files specified by ``model_uri``.
23     Note that this method assumes the model registry backend URI is the same as that of the
24     tracking backend.
25 
26     :param model_uri: URI referring to the MLmodel directory. Use a ``runs:/`` URI if you want to
27                       record the run ID with the model in model registry. ``models:/`` URIs are
28                       currently not supported.
29     :param name: Name of the registered model under which to create a new model version. If a
30                  registered model with the given name does not exist, it will be created
31                  automatically.
32     :param await_registration_for: Number of seconds to wait for the model version to finish
33                             being created and is in ``READY`` status. By default, the function
34                             waits for five minutes. Specify 0 or None to skip waiting.
35     :param tags: A dictionary of key-value pairs that are converted into
36                  :py:class:`mlflow.entities.model_registry.ModelVersionTag` objects.
37     :return: Single :py:class:`mlflow.entities.model_registry.ModelVersion` object created by
38              backend.
39 
40     .. code-block:: python
41         :caption: Example
42 
43         import mlflow.sklearn
44         from sklearn.ensemble import RandomForestRegressor
45 
46         mlflow.set_tracking_uri("sqlite:////tmp/mlruns.db")
47         params = {"n_estimators": 3, "random_state": 42}
48 
49         # Log MLflow entities
50         with mlflow.start_run() as run:
51            rfr = RandomForestRegressor(**params).fit([[0, 1]], [1])
52            mlflow.log_params(params)
53            mlflow.sklearn.log_model(rfr, artifact_path="sklearn-model")
54 
55         model_uri = "runs:/{}/sklearn-model".format(run.info.run_id)
56         mv = mlflow.register_model(model_uri, "RandomForestRegressionModel")
57         print("Name: {}".format(mv.name))
58         print("Version: {}".format(mv.version))
59 
60     .. code-block:: text
61         :caption: Output
62 
63         Name: RandomForestRegressionModel
64         Version: 1
65     """
66     client = MlflowClient()
67     try:
68         create_model_response = client.create_registered_model(name)
69         eprint("Successfully registered model '%s'." % create_model_response.name)
70     except MlflowException as e:
71         if e.error_code == ErrorCode.Name(RESOURCE_ALREADY_EXISTS):
72             eprint(
73                 "Registered model '%s' already exists. Creating a new version of this model..."
74                 % name
75             )
76         else:
77             raise e
78 
79     if RunsArtifactRepository.is_runs_uri(model_uri):
80         source = RunsArtifactRepository.get_underlying_uri(model_uri)
81         (run_id, _) = RunsArtifactRepository.parse_runs_uri(model_uri)
82         create_version_response = client.create_model_version(
83             name, source, run_id, tags=tags, await_creation_for=await_registration_for
84         )
85     else:
86         create_version_response = client.create_model_version(
87             name,
88             source=model_uri,
89             run_id=None,
90             tags=tags,
91             await_creation_for=await_registration_for,
92         )
93     eprint(
94         "Created version '{version}' of model '{model_name}'.".format(
95             version=create_version_response.version, model_name=create_version_response.name
96         )
97     )
98     return create_version_response
99 
100 
101 def search_registered_models(
102     max_results: Optional[int] = None,
103     filter_string: Optional[str] = None,
104     order_by: Optional[List[str]] = None,
105 ) -> List[RegisteredModel]:
106     """
107     Search for registered models that satisfy the filter criteria.
108 
109     :param filter_string: Filter query string
110         (e.g., ``"name = 'a_model_name' and tag.key = 'value1'"``),
111         defaults to searching for all registered models. The following identifiers, comparators,
112         and logical operators are supported.
113 
114         Identifiers
115           - ``name``: registered model name.
116           - ``tags.<tag_key>``: registered model tag. If ``tag_key`` contains spaces, it must be
117             wrapped with backticks (e.g., ``"tags.`extra key`"``).
118 
119         Comparators
120           - ``=``: Equal to.
121           - ``!=``: Not equal to.
122           - ``LIKE``: Case-sensitive pattern match.
123           - ``ILIKE``: Case-insensitive pattern match.
124 
125         Logical operators
126           - ``AND``: Combines two sub-queries and returns True if both of them are True.
127 
128     :param max_results: If passed, specifies the maximum number of models desired. If not
129                         passed, all models will be returned.
130     :param order_by: List of column names with ASC|DESC annotation, to be used for ordering
131                      matching search results.
132     :return: A list of :py:class:`mlflow.entities.model_registry.RegisteredModel` objects
133              that satisfy the search expressions.
134 
135     .. test-code-block:: python
136         :caption: Example
137 
138         import mlflow
139         from sklearn.linear_model import LogisticRegression
140 
141         with mlflow.start_run():
142             mlflow.sklearn.log_model(
143                 LogisticRegression(),
144                 "Cordoba",
145                 registered_model_name="CordobaWeatherForecastModel",
146             )
147             mlflow.sklearn.log_model(
148                 LogisticRegression(),
149                 "Boston",
150                 registered_model_name="BostonWeatherForecastModel",
151             )
152 
153         # Get search results filtered by the registered model name
154         filter_string = "name = 'CordobaWeatherForecastModel'"
155         results = mlflow.search_registered_models(filter_string=filter_string)
156         print("-" * 80)
157         for res in results:
158             for mv in res.latest_versions:
159                 print("name={}; run_id={}; version={}".format(mv.name, mv.run_id, mv.version))
160 
161         # Get search results filtered by the registered model name that matches
162         # prefix pattern
163         filter_string = "name LIKE 'Boston%'"
164         results = mlflow.search_registered_models(filter_string=filter_string)
165         print("-" * 80)
166         for res in results:
167             for mv in res.latest_versions:
168                 print("name={}; run_id={}; version={}".format(mv.name, mv.run_id, mv.version))
169 
170         # Get all registered models and order them by ascending order of the names
171         results = mlflow.search_registered_models(order_by=["name ASC"])
172         print("-" * 80)
173         for res in results:
174             for mv in res.latest_versions:
175                 print("name={}; run_id={}; version={}".format(mv.name, mv.run_id, mv.version))
176 
177     .. code-block:: text
178         :caption: Output
179 
180         --------------------------------------------------------------------------------
181         name=CordobaWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1
182         --------------------------------------------------------------------------------
183         name=BostonWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1
184         --------------------------------------------------------------------------------
185         name=BostonWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1
186         name=CordobaWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1
187 
188     """
189 
190     def pagination_wrapper_func(number_to_get, next_page_token):
191         return MlflowClient().search_registered_models(
192             max_results=number_to_get,
193             filter_string=filter_string,
194             order_by=order_by,
195             page_token=next_page_token,
196         )
197 
198     return get_results_from_paginated_fn(
199         pagination_wrapper_func,
200         SEARCH_REGISTERED_MODEL_MAX_RESULTS_DEFAULT,
201         max_results,
202     )
203
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mlflow/tracking/_model_registry/fluent.py b/mlflow/tracking/_model_registry/fluent.py
--- a/mlflow/tracking/_model_registry/fluent.py
+++ b/mlflow/tracking/_model_registry/fluent.py
@@ -37,7 +37,7 @@
     :return: Single :py:class:`mlflow.entities.model_registry.ModelVersion` object created by
              backend.
 
-    .. code-block:: python
+    .. test-code-block:: python
         :caption: Example
 
         import mlflow.sklearn

{"golden_diff": "diff --git a/mlflow/tracking/_model_registry/fluent.py b/mlflow/tracking/_model_registry/fluent.py\n--- a/mlflow/tracking/_model_registry/fluent.py\n+++ b/mlflow/tracking/_model_registry/fluent.py\n@@ -37,7 +37,7 @@\n     :return: Single :py:class:`mlflow.entities.model_registry.ModelVersion` object created by\n              backend.\n \n-    .. code-block:: python\n+    .. test-code-block:: python\n         :caption: Example\n \n         import mlflow.sklearn\n", "issue": "Convert `. code-block:: python` to `.. test-code-block:: python` in `mlflow/tracking/_model_registry/fluent.py`\nSee #7457 for more information.\n", "before_files": [{"content": "from mlflow.tracking.client import MlflowClient\nfrom mlflow.exceptions import MlflowException\nfrom mlflow.entities.model_registry import ModelVersion\nfrom mlflow.entities.model_registry import RegisteredModel\nfrom mlflow.protos.databricks_pb2 import RESOURCE_ALREADY_EXISTS, ErrorCode\nfrom mlflow.store.artifact.runs_artifact_repo import RunsArtifactRepository\nfrom mlflow.utils.logging_utils import eprint\nfrom mlflow.utils import get_results_from_paginated_fn\nfrom mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS\nfrom mlflow.store.model_registry import SEARCH_REGISTERED_MODEL_MAX_RESULTS_DEFAULT\nfrom typing import Any, Dict, Optional, List\n\n\ndef register_model(\n    model_uri,\n    name,\n    await_registration_for=DEFAULT_AWAIT_MAX_SLEEP_SECONDS,\n    *,\n    tags: Optional[Dict[str, Any]] = None,\n) -> ModelVersion:\n    \"\"\"\n    Create a new model version in model registry for the model files specified by ``model_uri``.\n    Note that this method assumes the model registry backend URI is the same as that of the\n    tracking backend.\n\n    :param model_uri: URI referring to the MLmodel directory. Use a ``runs:/`` URI if you want to\n                      record the run ID with the model in model registry. ``models:/`` URIs are\n                      currently not supported.\n    :param name: Name of the registered model under which to create a new model version. If a\n                 registered model with the given name does not exist, it will be created\n                 automatically.\n    :param await_registration_for: Number of seconds to wait for the model version to finish\n                            being created and is in ``READY`` status. By default, the function\n                            waits for five minutes. Specify 0 or None to skip waiting.\n    :param tags: A dictionary of key-value pairs that are converted into\n                 :py:class:`mlflow.entities.model_registry.ModelVersionTag` objects.\n    :return: Single :py:class:`mlflow.entities.model_registry.ModelVersion` object created by\n             backend.\n\n    .. code-block:: python\n        :caption: Example\n\n        import mlflow.sklearn\n        from sklearn.ensemble import RandomForestRegressor\n\n        mlflow.set_tracking_uri(\"sqlite:////tmp/mlruns.db\")\n        params = {\"n_estimators\": 3, \"random_state\": 42}\n\n        # Log MLflow entities\n        with mlflow.start_run() as run:\n           rfr = RandomForestRegressor(**params).fit([[0, 1]], [1])\n           mlflow.log_params(params)\n           mlflow.sklearn.log_model(rfr, artifact_path=\"sklearn-model\")\n\n        model_uri = \"runs:/{}/sklearn-model\".format(run.info.run_id)\n        mv = mlflow.register_model(model_uri, \"RandomForestRegressionModel\")\n        print(\"Name: {}\".format(mv.name))\n        print(\"Version: {}\".format(mv.version))\n\n    .. code-block:: text\n        :caption: Output\n\n        Name: RandomForestRegressionModel\n        Version: 1\n    \"\"\"\n    client = MlflowClient()\n    try:\n        create_model_response = client.create_registered_model(name)\n        eprint(\"Successfully registered model '%s'.\" % create_model_response.name)\n    except MlflowException as e:\n        if e.error_code == ErrorCode.Name(RESOURCE_ALREADY_EXISTS):\n            eprint(\n                \"Registered model '%s' already exists. Creating a new version of this model...\"\n                % name\n            )\n        else:\n            raise e\n\n    if RunsArtifactRepository.is_runs_uri(model_uri):\n        source = RunsArtifactRepository.get_underlying_uri(model_uri)\n        (run_id, _) = RunsArtifactRepository.parse_runs_uri(model_uri)\n        create_version_response = client.create_model_version(\n            name, source, run_id, tags=tags, await_creation_for=await_registration_for\n        )\n    else:\n        create_version_response = client.create_model_version(\n            name,\n            source=model_uri,\n            run_id=None,\n            tags=tags,\n            await_creation_for=await_registration_for,\n        )\n    eprint(\n        \"Created version '{version}' of model '{model_name}'.\".format(\n            version=create_version_response.version, model_name=create_version_response.name\n        )\n    )\n    return create_version_response\n\n\ndef search_registered_models(\n    max_results: Optional[int] = None,\n    filter_string: Optional[str] = None,\n    order_by: Optional[List[str]] = None,\n) -> List[RegisteredModel]:\n    \"\"\"\n    Search for registered models that satisfy the filter criteria.\n\n    :param filter_string: Filter query string\n        (e.g., ``\"name = 'a_model_name' and tag.key = 'value1'\"``),\n        defaults to searching for all registered models. The following identifiers, comparators,\n        and logical operators are supported.\n\n        Identifiers\n          - ``name``: registered model name.\n          - ``tags.<tag_key>``: registered model tag. If ``tag_key`` contains spaces, it must be\n            wrapped with backticks (e.g., ``\"tags.`extra key`\"``).\n\n        Comparators\n          - ``=``: Equal to.\n          - ``!=``: Not equal to.\n          - ``LIKE``: Case-sensitive pattern match.\n          - ``ILIKE``: Case-insensitive pattern match.\n\n        Logical operators\n          - ``AND``: Combines two sub-queries and returns True if both of them are True.\n\n    :param max_results: If passed, specifies the maximum number of models desired. If not\n                        passed, all models will be returned.\n    :param order_by: List of column names with ASC|DESC annotation, to be used for ordering\n                     matching search results.\n    :return: A list of :py:class:`mlflow.entities.model_registry.RegisteredModel` objects\n             that satisfy the search expressions.\n\n    .. test-code-block:: python\n        :caption: Example\n\n        import mlflow\n        from sklearn.linear_model import LogisticRegression\n\n        with mlflow.start_run():\n            mlflow.sklearn.log_model(\n                LogisticRegression(),\n                \"Cordoba\",\n                registered_model_name=\"CordobaWeatherForecastModel\",\n            )\n            mlflow.sklearn.log_model(\n                LogisticRegression(),\n                \"Boston\",\n                registered_model_name=\"BostonWeatherForecastModel\",\n            )\n\n        # Get search results filtered by the registered model name\n        filter_string = \"name = 'CordobaWeatherForecastModel'\"\n        results = mlflow.search_registered_models(filter_string=filter_string)\n        print(\"-\" * 80)\n        for res in results:\n            for mv in res.latest_versions:\n                print(\"name={}; run_id={}; version={}\".format(mv.name, mv.run_id, mv.version))\n\n        # Get search results filtered by the registered model name that matches\n        # prefix pattern\n        filter_string = \"name LIKE 'Boston%'\"\n        results = mlflow.search_registered_models(filter_string=filter_string)\n        print(\"-\" * 80)\n        for res in results:\n            for mv in res.latest_versions:\n                print(\"name={}; run_id={}; version={}\".format(mv.name, mv.run_id, mv.version))\n\n        # Get all registered models and order them by ascending order of the names\n        results = mlflow.search_registered_models(order_by=[\"name ASC\"])\n        print(\"-\" * 80)\n        for res in results:\n            for mv in res.latest_versions:\n                print(\"name={}; run_id={}; version={}\".format(mv.name, mv.run_id, mv.version))\n\n    .. code-block:: text\n        :caption: Output\n\n        --------------------------------------------------------------------------------\n        name=CordobaWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1\n        --------------------------------------------------------------------------------\n        name=BostonWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1\n        --------------------------------------------------------------------------------\n        name=BostonWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1\n        name=CordobaWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1\n\n    \"\"\"\n\n    def pagination_wrapper_func(number_to_get, next_page_token):\n        return MlflowClient().search_registered_models(\n            max_results=number_to_get,\n            filter_string=filter_string,\n            order_by=order_by,\n            page_token=next_page_token,\n        )\n\n    return get_results_from_paginated_fn(\n        pagination_wrapper_func,\n        SEARCH_REGISTERED_MODEL_MAX_RESULTS_DEFAULT,\n        max_results,\n    )\n", "path": "mlflow/tracking/_model_registry/fluent.py"}], "after_files": [{"content": "from mlflow.tracking.client import MlflowClient\nfrom mlflow.exceptions import MlflowException\nfrom mlflow.entities.model_registry import ModelVersion\nfrom mlflow.entities.model_registry import RegisteredModel\nfrom mlflow.protos.databricks_pb2 import RESOURCE_ALREADY_EXISTS, ErrorCode\nfrom mlflow.store.artifact.runs_artifact_repo import RunsArtifactRepository\nfrom mlflow.utils.logging_utils import eprint\nfrom mlflow.utils import get_results_from_paginated_fn\nfrom mlflow.tracking._model_registry import DEFAULT_AWAIT_MAX_SLEEP_SECONDS\nfrom mlflow.store.model_registry import SEARCH_REGISTERED_MODEL_MAX_RESULTS_DEFAULT\nfrom typing import Any, Dict, Optional, List\n\n\ndef register_model(\n    model_uri,\n    name,\n    await_registration_for=DEFAULT_AWAIT_MAX_SLEEP_SECONDS,\n    *,\n    tags: Optional[Dict[str, Any]] = None,\n) -> ModelVersion:\n    \"\"\"\n    Create a new model version in model registry for the model files specified by ``model_uri``.\n    Note that this method assumes the model registry backend URI is the same as that of the\n    tracking backend.\n\n    :param model_uri: URI referring to the MLmodel directory. Use a ``runs:/`` URI if you want to\n                      record the run ID with the model in model registry. ``models:/`` URIs are\n                      currently not supported.\n    :param name: Name of the registered model under which to create a new model version. If a\n                 registered model with the given name does not exist, it will be created\n                 automatically.\n    :param await_registration_for: Number of seconds to wait for the model version to finish\n                            being created and is in ``READY`` status. By default, the function\n                            waits for five minutes. Specify 0 or None to skip waiting.\n    :param tags: A dictionary of key-value pairs that are converted into\n                 :py:class:`mlflow.entities.model_registry.ModelVersionTag` objects.\n    :return: Single :py:class:`mlflow.entities.model_registry.ModelVersion` object created by\n             backend.\n\n    .. test-code-block:: python\n        :caption: Example\n\n        import mlflow.sklearn\n        from sklearn.ensemble import RandomForestRegressor\n\n        mlflow.set_tracking_uri(\"sqlite:////tmp/mlruns.db\")\n        params = {\"n_estimators\": 3, \"random_state\": 42}\n\n        # Log MLflow entities\n        with mlflow.start_run() as run:\n           rfr = RandomForestRegressor(**params).fit([[0, 1]], [1])\n           mlflow.log_params(params)\n           mlflow.sklearn.log_model(rfr, artifact_path=\"sklearn-model\")\n\n        model_uri = \"runs:/{}/sklearn-model\".format(run.info.run_id)\n        mv = mlflow.register_model(model_uri, \"RandomForestRegressionModel\")\n        print(\"Name: {}\".format(mv.name))\n        print(\"Version: {}\".format(mv.version))\n\n    .. code-block:: text\n        :caption: Output\n\n        Name: RandomForestRegressionModel\n        Version: 1\n    \"\"\"\n    client = MlflowClient()\n    try:\n        create_model_response = client.create_registered_model(name)\n        eprint(\"Successfully registered model '%s'.\" % create_model_response.name)\n    except MlflowException as e:\n        if e.error_code == ErrorCode.Name(RESOURCE_ALREADY_EXISTS):\n            eprint(\n                \"Registered model '%s' already exists. Creating a new version of this model...\"\n                % name\n            )\n        else:\n            raise e\n\n    if RunsArtifactRepository.is_runs_uri(model_uri):\n        source = RunsArtifactRepository.get_underlying_uri(model_uri)\n        (run_id, _) = RunsArtifactRepository.parse_runs_uri(model_uri)\n        create_version_response = client.create_model_version(\n            name, source, run_id, tags=tags, await_creation_for=await_registration_for\n        )\n    else:\n        create_version_response = client.create_model_version(\n            name,\n            source=model_uri,\n            run_id=None,\n            tags=tags,\n            await_creation_for=await_registration_for,\n        )\n    eprint(\n        \"Created version '{version}' of model '{model_name}'.\".format(\n            version=create_version_response.version, model_name=create_version_response.name\n        )\n    )\n    return create_version_response\n\n\ndef search_registered_models(\n    max_results: Optional[int] = None,\n    filter_string: Optional[str] = None,\n    order_by: Optional[List[str]] = None,\n) -> List[RegisteredModel]:\n    \"\"\"\n    Search for registered models that satisfy the filter criteria.\n\n    :param filter_string: Filter query string\n        (e.g., ``\"name = 'a_model_name' and tag.key = 'value1'\"``),\n        defaults to searching for all registered models. The following identifiers, comparators,\n        and logical operators are supported.\n\n        Identifiers\n          - ``name``: registered model name.\n          - ``tags.<tag_key>``: registered model tag. If ``tag_key`` contains spaces, it must be\n            wrapped with backticks (e.g., ``\"tags.`extra key`\"``).\n\n        Comparators\n          - ``=``: Equal to.\n          - ``!=``: Not equal to.\n          - ``LIKE``: Case-sensitive pattern match.\n          - ``ILIKE``: Case-insensitive pattern match.\n\n        Logical operators\n          - ``AND``: Combines two sub-queries and returns True if both of them are True.\n\n    :param max_results: If passed, specifies the maximum number of models desired. If not\n                        passed, all models will be returned.\n    :param order_by: List of column names with ASC|DESC annotation, to be used for ordering\n                     matching search results.\n    :return: A list of :py:class:`mlflow.entities.model_registry.RegisteredModel` objects\n             that satisfy the search expressions.\n\n    .. test-code-block:: python\n        :caption: Example\n\n        import mlflow\n        from sklearn.linear_model import LogisticRegression\n\n        with mlflow.start_run():\n            mlflow.sklearn.log_model(\n                LogisticRegression(),\n                \"Cordoba\",\n                registered_model_name=\"CordobaWeatherForecastModel\",\n            )\n            mlflow.sklearn.log_model(\n                LogisticRegression(),\n                \"Boston\",\n                registered_model_name=\"BostonWeatherForecastModel\",\n            )\n\n        # Get search results filtered by the registered model name\n        filter_string = \"name = 'CordobaWeatherForecastModel'\"\n        results = mlflow.search_registered_models(filter_string=filter_string)\n        print(\"-\" * 80)\n        for res in results:\n            for mv in res.latest_versions:\n                print(\"name={}; run_id={}; version={}\".format(mv.name, mv.run_id, mv.version))\n\n        # Get search results filtered by the registered model name that matches\n        # prefix pattern\n        filter_string = \"name LIKE 'Boston%'\"\n        results = mlflow.search_registered_models(filter_string=filter_string)\n        print(\"-\" * 80)\n        for res in results:\n            for mv in res.latest_versions:\n                print(\"name={}; run_id={}; version={}\".format(mv.name, mv.run_id, mv.version))\n\n        # Get all registered models and order them by ascending order of the names\n        results = mlflow.search_registered_models(order_by=[\"name ASC\"])\n        print(\"-\" * 80)\n        for res in results:\n            for mv in res.latest_versions:\n                print(\"name={}; run_id={}; version={}\".format(mv.name, mv.run_id, mv.version))\n\n    .. code-block:: text\n        :caption: Output\n\n        --------------------------------------------------------------------------------\n        name=CordobaWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1\n        --------------------------------------------------------------------------------\n        name=BostonWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1\n        --------------------------------------------------------------------------------\n        name=BostonWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1\n        name=CordobaWeatherForecastModel; run_id=248c66a666744b4887bdeb2f9cf7f1c6; version=1\n\n    \"\"\"\n\n    def pagination_wrapper_func(number_to_get, next_page_token):\n        return MlflowClient().search_registered_models(\n            max_results=number_to_get,\n            filter_string=filter_string,\n            order_by=order_by,\n            page_token=next_page_token,\n        )\n\n    return get_results_from_paginated_fn(\n        pagination_wrapper_func,\n        SEARCH_REGISTERED_MODEL_MAX_RESULTS_DEFAULT,\n        max_results,\n    )\n", "path": "mlflow/tracking/_model_registry/fluent.py"}]}