Skip to content

Commit d00d8b9

Browse files
Add MLflow typo checker (mlflow#10224)
Signed-off-by: harupy <[email protected]> Signed-off-by: mlflow-automation <[email protected]> Co-authored-by: mlflow-automation <[email protected]>
1 parent 5598a39 commit d00d8b9

File tree

54 files changed

+121
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+121
-109
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Mlflow
1+
# MLflow
22
mlruns/
33
mlartifacts/
44
outputs/

.pre-commit-config.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,8 @@ repos:
5555
entry: 'grep "Signed-off-by:"'
5656
language: system
5757
stages: [prepare-commit-msg]
58+
59+
- id: mlflow-typo
60+
name: mlflow-typo
61+
entry: dev/mlflow-typo.sh
62+
language: system

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Features:
3131
- [Tracking] Introduce support for Spark 3.5's SparkConnect mode within MLflow to allow logging models created using this operation mode of Spark (#9534, @WeichenXu123)
3232
- [Tracking] Add support for logging system metrics to the MLflow fluent API (#9557, #9712, #9714, @chenmoneygithub)
3333
- [Tracking] Add callbacks within MLflow for Keras and Tensorflow (#9454, #9637, #9579, @chenmoneygithub)
34-
- [Tracking] Introduce a fluent login API for Databricks within Mlflow (#9665, #10180, @chenmoneygithub)
34+
- [Tracking] Introduce a fluent login API for Databricks within MLflow (#9665, #10180, @chenmoneygithub)
3535
- [Tracking] Add support for customizing auth for http requests from the MLflow client via a plugin extension (#10049, @lu-ohai)
3636
- [Tracking] Introduce experimental asynchronous logging support for metrics, params, and tags (#9705, @sagarsumant)
3737
- [Auth] Modify the behavior of user creation in MLflow Authentication so that only admins can create new users (#9700, @gabrielfu)
@@ -1341,7 +1341,7 @@ Bug fixes and documentation updates:
13411341
- Fixed bug where MLflow model schema enforcement raised exceptions when validating string columns using pandas >= 1.0 (#3130, @harupy)
13421342
- Fixed bug where `mlflow.spark.log_model` did not save model signature and input examples (#3151, @harupy)
13431343
- Fixed bug in runs UI where tags table did not reflect deletion of tags. (#3135, @ParseDark)
1344-
- Added example illustrating the use of RAPIDS with MLFlow (#3028, @drobison00)
1344+
- Added example illustrating the use of RAPIDS with MLflow (#3028, @drobison00)
13451345

13461346
Small bug fixes and doc updates (#3326, #3344, #3314, #3289, #3225, #3288, #3279, #3265, #3263, #3260, #3255, #3267, #3266, #3264, #3256, #3253, #3231, #3245, #3191, #3238, #3192, #3188, #3189, #3180, #3178, #3166, #3181, #3142, #3165, #2960, #3129, #3244, #3359 @harupy; #3236, #3141, @AveshCSingh; #3295, #3163, @arjundc-db; #3241, #3200, @zhidongqu-db; #3338, #3275, @sueann; #3020, @magnus-m; #3322, #3219, @dmatrix; #3341, #3179, #3355, #3360, #3363 @smurching; #3124, @jdlesage; #3232, #3146, @ankitmathur-db; #3140, @andreakress; #3174, #3133, @mlflow-automation; #3062, @cafeal; #3193, @tomasatdatabricks; 3115, @fhoering; #3328, @apurva-koti; #3046, @OlivierBondu; #3194, #3158, @dmatrix; #3250, @shivp950; #3259, @simonhessner; #3357 @dbczumar)
13471347

SECURITY.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ of MLflow, we may opt to backport patches to previous versions.
1212

1313
## Reporting a Vulnerability
1414

15-
When finding a security vulnerability in Mlflow, please perform the following actions:
15+
When finding a security vulnerability in MLflow, please perform the following actions:
1616

17-
- [Open an issue](https://github.com/mlflow/mlflow/issues/new?assignees=&labels=bug&template=bug_report_template.md&title=%5BBUG%5D%20Security%20Vulnerability) on the Mlflow repository. Ensure that you use `[BUG] Security Vulnerability` as the title and _do not_ mention any vulnerability details in the issue post.
17+
- [Open an issue](https://github.com/mlflow/mlflow/issues/new?assignees=&labels=bug&template=bug_report_template.md&title=%5BBUG%5D%20Security%20Vulnerability) on the MLflow repository. Ensure that you use `[BUG] Security Vulnerability` as the title and _do not_ mention any vulnerability details in the issue post.
1818
- Send a notification [email](mailto:[email protected]) to `[email protected]` that contains, at a minimum:
1919
- The link to the filed issue stub.
2020
- Your GitHub handle.

dev/mlflow-typo.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
if grep -nP '\bM(lf|LF|lF)low\b' "$@"; then
4+
exit 1
5+
else
6+
exit 0
7+
fi

docs/source/R-api.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Get information from a Databricks job execution context
4545

4646
Parses the data from a job execution context when running on Databricks
4747
in a non-interactive mode. This function extracts relevant data that
48-
Mlflow needs in order to properly utilize the MLflow APIs from this
48+
MLflow needs in order to properly utilize the MLflow APIs from this
4949
context.
5050

5151
.. code:: r

docs/source/getting-started/logging-first-model/step2-mlflow-client.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ We now have a client interface to the tracking server that can both send data to
5353
The Default Experiment
5454
----------------------
5555

56-
Before we get to logging anything to the Tracking Server, let's take a look at a key feature that exists at the outset of starting any Mlflow
56+
Before we get to logging anything to the Tracking Server, let's take a look at a key feature that exists at the outset of starting any MLflow
5757
Tracking Server: the Default Experiment.
5858

5959
The Default Experiment is a placeholder that is used to encapsulate all run information if an explicit Experiment is not declared.
@@ -114,7 +114,7 @@ Running it
114114
:align: center
115115
:alt: Exploring the Default Experiment
116116

117-
Using the Mlflow Client's search_experiments() API to view the Default Experiment
117+
Using the MLflow Client's search_experiments() API to view the Default Experiment
118118

119119
In the next step, we'll create our first experiment and dive into the options that are available for
120120
providing metadata information that helps to keep track of related experiments and organize our

docs/source/llms/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ configuration and management of your LLM serving needs, select the provider that
8787
</a>
8888
<a href="gateway/index.html#providers">
8989
<div class="logo-card">
90-
<img src="../_static/images/logos/mlflow-logo.svg" alt="Mlflow Logo">
90+
<img src="../_static/images/logos/mlflow-logo.svg" alt="MLflow Logo">
9191
</div>
9292
</a>
9393
<a href="gateway/index.html#providers">

docs/source/llms/llm-evaluate/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Use a Custom List of Metrics
177177
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
178178

179179
Using the pre-defined metrics associated with a given model type is not the only way to generate scoring metrics
180-
for LLM evaluation in MLFlow. You can specify a custom list of metrics in the `extra_metrics` argument in `mlflow.evaluate`:
180+
for LLM evaluation in MLflow. You can specify a custom list of metrics in the `extra_metrics` argument in `mlflow.evaluate`:
181181

182182
* To add additional metrics to the default metrics list of pre-defined model type, keep the `model_type` and add your metrics to ``extra_metrics``:
183183

docs/source/llms/llm-evaluate/notebooks/rag-evaluation.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
" {\n",
251251
" \"questions\": [\n",
252252
" \"What is MLflow?\",\n",
253-
" \"How to run Mlflow.evalaute()?\",\n",
253+
" \"How to run MLflow.evalaute()?\",\n",
254254
" \"How to log_table()?\",\n",
255255
" \"How to load_table()?\",\n",
256256
" ],\n",
@@ -626,9 +626,9 @@
626626
" </tr>\n",
627627
" <tr>\n",
628628
" <th>1</th>\n",
629-
" <td>How to run Mlflow.evalaute()?</td>\n",
629+
" <td>How to run MLflow.evalaute()?</td>\n",
630630
" <td>You can use the MLflow Python API to run Mlfl...</td>\n",
631-
" <td>How to run Mlflow.evalaute()?</td>\n",
631+
" <td>How to run MLflow.evalaute()?</td>\n",
632632
" <td>[{'lc_attributes': {}, 'lc_secrets': {}, 'meta...</td>\n",
633633
" <td>2.885425</td>\n",
634634
" <td>30</td>\n",
@@ -679,7 +679,7 @@
679679
"text/plain": [
680680
" questions \\\n",
681681
"0 What is MLflow? \n",
682-
"1 How to run Mlflow.evalaute()? \n",
682+
"1 How to run MLflow.evalaute()? \n",
683683
"2 How to log_table()? \n",
684684
"3 How to load_table()? \n",
685685
"\n",
@@ -691,7 +691,7 @@
691691
"\n",
692692
" query \\\n",
693693
"0 What is MLflow? \n",
694-
"1 How to run Mlflow.evalaute()? \n",
694+
"1 How to run MLflow.evalaute()? \n",
695695
"2 How to log_table()? \n",
696696
"3 How to load_table()? \n",
697697
"\n",

docs/source/llms/rag/notebooks/question-generation-retrieval-evaluation.ipynb

+5-5
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
},
282282
"source": [
283283
"## Step 4: Get Document Data\n",
284-
"We scrape the documents from the Mlflow website to use to generate questions."
284+
"We scrape the documents from the MLflow website to use to generate questions."
285285
]
286286
},
287287
{
@@ -1069,7 +1069,7 @@
10691069
}
10701070
},
10711071
"source": [
1072-
"We append 5 benchmark queries to help visualize how diverse the questions are. The first four of these questions are semantically similar and all asking about Mlflow, while the last is different and refers to spark and model registry."
1072+
"We append 5 benchmark queries to help visualize how diverse the questions are. The first four of these questions are semantically similar and all asking about MLflow, while the last is different and refers to spark and model registry."
10731073
]
10741074
},
10751075
{
@@ -1125,9 +1125,9 @@
11251125
"source": [
11261126
"benchmark_questions = [\n",
11271127
" \"What is MLflow?\",\n",
1128-
" \"What is Mlflow about?\",\n",
1129-
" \"Tell me about Mlflow Tracking\",\n",
1130-
" \"How does Mlflow work?\",\n",
1128+
" \"What is MLflow about?\",\n",
1129+
" \"Tell me about MLflow Tracking\",\n",
1130+
" \"How does MLflow work?\",\n",
11311131
" \"How is spark used in model registry?\",\n",
11321132
"]\n",
11331133
"questions_to_embed = questions_to_embed + benchmark_questions"

docs/source/models.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4114,7 +4114,7 @@ Let's examine the custom flavor module in more detail. The first step is to impo
41144114
inluding ``sktime`` library, various MLflow utilities as well as the MLflow ``pyfunc`` module which
41154115
is required to add the ``pyfunc`` specification to the MLflow model configuration. Note also the
41164116
import of the ``flavor`` module itself. This will be passed to the
4117-
:py:func:`mlflow.models.Model.log()` method to log the model as an artifact to the current Mlflow
4117+
:py:func:`mlflow.models.Model.log()` method to log the model as an artifact to the current MLflow
41184118
run.
41194119

41204120
.. code-block:: python

docs/source/new-features/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Find out about the details of major features, changes, and deprecations below.
209209
<div class="header">
210210
Introducing the MLflow AI Gateway
211211
</div>
212-
<img class="card-image" src="../_static/images/logos/mlflow-logo.svg" alt="Mlflow"></img>
212+
<img class="card-image" src="../_static/images/logos/mlflow-logo.svg" alt="MLflow"></img>
213213
<div class="body">
214214
We're excited to announce the newest top-level component in the MLflow ecosystem: <strong>The AI Gateway</strong>.
215215
</div>

docs/source/plugins.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ The MLflow Python API supports several types of plugins:
2525
* **Run context providers**: specify context tags to be set on runs created via the
2626
:py:func:`mlflow.start_run` fluent API.
2727
* **Model Registry Store**: override model registry backend logic, e.g. to log to a third-party storage solution
28-
* **MLFlow Project backend**: override the local execution backend to execute a project on your own cluster (Databricks, kubernetes, etc.)
29-
* **MLFlow ModelEvaluator**: Define custom model evaluator, which can be used in :py:func:`mlflow.evaluate` API.
28+
* **MLflow Project backend**: override the local execution backend to execute a project on your own cluster (Databricks, kubernetes, etc.)
29+
* **MLflow ModelEvaluator**: Define custom model evaluator, which can be used in :py:func:`mlflow.evaluate` API.
3030

3131
.. contents:: Table of Contents
3232
:local:
@@ -156,7 +156,7 @@ The example package contains a ``setup.py`` that declares a number of
156156
"mlflow.project_backend": "dummy-backend=mlflow_test_plugin.dummy_backend:PluginDummyProjectBackend",
157157
# Define a MLflow model deployment plugin for target 'faketarget'
158158
"mlflow.deployments": "faketarget=mlflow_test_plugin.fake_deployment_plugin",
159-
# Define a Mlflow model evaluator with name "dummy_evaluator"
159+
# Define a MLflow model evaluator with name "dummy_evaluator"
160160
"mlflow.model_evaluator": "dummy_evaluator=mlflow_test_plugin.dummy_evaluator:DummyEvaluator",
161161
},
162162
)
@@ -286,8 +286,8 @@ reference implementations as an example:
286286
* `Example ArtifactRepository tests <https://github.com/mlflow/mlflow/blob/branch-1.5/tests/store/artifact/test_local_artifact_repo.py>`_
287287
* `Example RunContextProvider tests <https://github.com/mlflow/mlflow/blob/branch-1.5/tests/tracking/context/test_git_context.py>`_
288288
* `Example Model Registry Store tests <https://github.com/mlflow/mlflow/blob/branch-1.5/tests/store/model_registry/test_sqlalchemy_store.py>`_
289-
* `Example Custom Mlflow Evaluator tests <https://github.com/mlflow/mlflow/blob/branch-1.23/tests/resources/mlflow-test-plugin/mlflow_test_plugin/dummy_evaluator.py>`_
290-
* `Example Custom Mlflow server tests <https://github.com/mlflow/mlflow/blob/branch-2.2.0/tests/server/test_handlers.py>`_
289+
* `Example Custom MLflow Evaluator tests <https://github.com/mlflow/mlflow/blob/branch-1.23/tests/resources/mlflow-test-plugin/mlflow_test_plugin/dummy_evaluator.py>`_
290+
* `Example Custom MLflow server tests <https://github.com/mlflow/mlflow/blob/branch-2.2.0/tests/server/test_handlers.py>`_
291291

292292

293293
Distributing Your Plugin

docs/source/tracking.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ MLflow's Tracking Server can be used in an exclusive artifact proxied artifact h
280280
281281
mlflow server --artifacts-destination s3://bucket_name --artifacts-only --host remote_host
282282
283-
Running an MLFlow server in ``--artifacts-only`` mode:
283+
Running an MLflow server in ``--artifacts-only`` mode:
284284

285285
* **Part 1a and b**:
286286

@@ -909,7 +909,7 @@ This simplifies access requirements for users of the MLflow client, eliminating
909909
configure access tokens or username and password environment variables for the underlying object store when writing or retrieving artifacts.
910910
To disable proxied access for artifacts, specify ``--no-serve-artifacts``.
911911

912-
Provided an Mlflow server configuration where the ``--default-artifact-root`` is ``s3://my-root-bucket``,
912+
Provided an MLflow server configuration where the ``--default-artifact-root`` is ``s3://my-root-bucket``,
913913
the following patterns will all resolve to the configured proxied object store location of ``s3://my-root-bucket/mlartifacts``:
914914

915915
* ``https://<host>:<port>/mlartifacts``

examples/evaluation/rag-evaluation.ipynb

+9-9
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
" {\n",
251251
" \"questions\": [\n",
252252
" \"What is MLflow?\",\n",
253-
" \"How to run Mlflow.evaluate()?\",\n",
253+
" \"How to run MLflow.evaluate()?\",\n",
254254
" \"How to log_table()?\",\n",
255255
" \"How to load_table()?\",\n",
256256
" ],\n",
@@ -483,9 +483,9 @@
483483
" </tr>\n",
484484
" <tr>\n",
485485
" <th>1</th>\n",
486-
" <td>How to run Mlflow.evaluate()?</td>\n",
487-
" <td>\\n\\nYou can run Mlflow.evaluate() by using the...</td>\n",
488-
" <td>How to run Mlflow.evaluate()?</td>\n",
486+
" <td>How to run MLflow.evaluate()?</td>\n",
487+
" <td>\\n\\nYou can run MLflow.evaluate() by using the...</td>\n",
488+
" <td>How to run MLflow.evaluate()?</td>\n",
489489
" <td>[{'lc_attributes': {}, 'lc_namespace': ['langc...</td>\n",
490490
" <td>1.083653</td>\n",
491491
" <td>39</td>\n",
@@ -494,7 +494,7 @@
494494
" <td>4.7</td>\n",
495495
" <td>4.5</td>\n",
496496
" <td>5</td>\n",
497-
" <td>The output states that \"You can run Mlflow.eva...</td>\n",
497+
" <td>The output states that \"You can run MLflow.eva...</td>\n",
498498
" </tr>\n",
499499
" <tr>\n",
500500
" <th>2</th>\n",
@@ -533,19 +533,19 @@
533533
"text/plain": [
534534
" questions \\\n",
535535
"0 What is MLflow? \n",
536-
"1 How to run Mlflow.evaluate()? \n",
536+
"1 How to run MLflow.evaluate()? \n",
537537
"2 How to log_table()? \n",
538538
"3 How to load_table()? \n",
539539
"\n",
540540
" outputs \\\n",
541541
"0 MLflow is an open source platform for managin... \n",
542-
"1 \\n\\nYou can run Mlflow.evaluate() by using the... \n",
542+
"1 \\n\\nYou can run MLflow.evaluate() by using the... \n",
543543
"2 \\n\\nYou can use the log_table() function in ML... \n",
544544
"3 load_table() is not a function in MLflow. \n",
545545
"\n",
546546
" query \\\n",
547547
"0 What is MLflow? \n",
548-
"1 How to run Mlflow.evaluate()? \n",
548+
"1 How to run MLflow.evaluate()? \n",
549549
"2 How to log_table()? \n",
550550
"3 How to load_table()? \n",
551551
"\n",
@@ -569,7 +569,7 @@
569569
"\n",
570570
" faithfulness/v1/score faithfulness/v1/justification \n",
571571
"0 5 The output provided by the model is a detailed... \n",
572-
"1 5 The output states that \"You can run Mlflow.eva... \n",
572+
"1 5 The output states that \"You can run MLflow.eva... \n",
573573
"2 1 The output provides a detailed explanation of ... \n",
574574
"3 5 The output states that \"load_table() is not a ... "
575575
]

examples/flower_classifier/README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ To train the model, run the example as a standard MLflow project:
7878
mlflow run examples/flower_classifier
7979
8080
This will download the training dataset from ``tensorflow.org``, train a classifier using Keras and
81-
log results with Mlflow.
81+
log results with MLflow.
8282

8383
To test your model, run the included scoring scripts. For example, say your model was trained with
8484
run_id ``101``.

examples/gateway/huggingface/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ See the [example script](example.py) within this directory to see how to query t
9797

9898
## Setting the parameters of TGI
9999

100-
When you make a request to MLFlow gateway, the information you provide in the request body will be sent to TGI. This gives you more control over the output you receive from TGI. However, it's important to note that you cannot turn off `details` and `decoder_input_details`, as they are necessary for MLFlow Gateway to work correctly.
100+
When you make a request to MLflow gateway, the information you provide in the request body will be sent to TGI. This gives you more control over the output you receive from TGI. However, it's important to note that you cannot turn off `details` and `decoder_input_details`, as they are necessary for MLflow Gateway to work correctly.

examples/gateway/mlflow_serving/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
In order to utilize the MLflow AI Gateway with MLflow model serving, a few steps must be taken
44
in addition to those for configuring access to SaaS models (such as Anthropic and OpenAI). The first and most obvious
5-
step that must be taken prior to interfacing with an Mlflow served model is that a model needs to be logged to the
5+
step that must be taken prior to interfacing with an MLflow served model is that a model needs to be logged to the
66
MLflow tracking server.
77

88
An important consideration for deciding whether to interface the MLflow AI Gateway with a specific model is to evaluate the PyFunc interface that the model will
@@ -156,7 +156,7 @@ mlflow models serve -m file:///Users/me/demos/mlruns/0/bc8bdb7fb90c406eb95603a97
156156

157157
## Update the config.yaml to add a new completions route
158158

159-
Ensure that the Mlflow serving endpoint starts and is ready for traffic.
159+
Ensure that the MLflow serving endpoint starts and is ready for traffic.
160160

161161
```commandline
162162
2023/08/08 17:39:14 INFO mlflow.models.flavor_backend_registry: Selected backend for flavor 'python_function'
@@ -362,7 +362,7 @@ routes:
362362
model_server_url: http://127.0.0.1:9030
363363
```
364364

365-
## Start the Mlflow AI Gateway server
365+
## Start the MLflow AI Gateway server
366366

367367
Now that both routes (or all 3, if adding in the optional MPT-7B-instruct model route) are defined within the configuration YAML file and the Model Serving servers are ready to receive queries, we can start the MLflow AI Gateway server.
368368

0 commit comments

Comments
 (0)