Improve documentation for 'prompt_template'#19105
Merged
harupy merged 1 commit intomlflow:masterfrom Nov 28, 2025
Merged
Conversation
Contributor
|
@ingo-stallknecht Thank you for the contribution! Could you fix the following issue(s)? ⚠ DCO checkThe DCO check failed. Please sign off your commit(s) by following the instructions here. See https://github.com/mlflow/mlflow/blob/master/CONTRIBUTING.md#sign-your-work for more details. |
…avor Signed-off-by: Ingo Stallknecht <ingostallknecht@gmail.com>
256360d to
a9a9a37
Compare
Contributor
|
Documentation preview for a9a9a37 is available at: More info
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the documentation for the prompt_template parameter in the transformers flavor by adding a practical Python code example. The change improves developer understanding of how to use prompt templates with text-generation pipelines.
- Adds a complete working example demonstrating prompt template usage with
mlflow.transformers.log_model - Shows the end-to-end workflow including logging, loading, and inference with the pyfunc flavor
- Maintains consistency with existing documentation style and patterns
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BenWilson2
pushed a commit
to BenWilson2/mlflow
that referenced
this pull request
Dec 4, 2025
Signed-off-by: Ingo Stallknecht <ingostallknecht@gmail.com>
BenWilson2
pushed a commit
that referenced
this pull request
Dec 4, 2025
Signed-off-by: Ingo Stallknecht <ingostallknecht@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
Related Issues/PRs
None.
What changes are proposed in this pull request?
This PR improves the documentation for the
prompt_templateparameter inLOG_MODEL_PARAM_DOCS(mlflow/mlflow/utils/docstring_utils.py).The original description already explained the
{prompt}placeholder and listedthe supported pipeline types. This update keeps the existing content intact and
adds a concise Python example demonstrating:
mlflow.transformers.log_model,This example makes the intended usage clearer and improves the usability of the
prompt_templatefeature without changing any behavior.How is this PR tested?
This is a documentation-only change.
Manual verification was performed to ensure that the added example integrates
correctly into the shared docstring, and CI will validate that the documentation
builds without issues.
Does this PR require documentation update?
This update enhances the API reference documentation for the
prompt_templateparameter by adding a practical example.
Release Notes
Is this a user-facing change?
Improved documentation for the
prompt_templateparameter in the transformersflavor, including a short usage example.
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/trackingarea/modelsarea/model-registryarea/scoringarea/evaluationarea/gatewayarea/promptsarea/tracingarea/projectsarea/uiuxarea/buildarea/docsHow should the PR be classified in the release notes? Choose one:
rn/nonern/breaking-changern/featurern/bug-fixrn/documentationShould this PR be included in the next patch release?