Skip to content

Update transformers and sentence transformers docs#18925

Merged
BenWilson2 merged 6 commits intomlflow:masterfrom
BenWilson2:cleanup-transformers-docs
Dec 3, 2025
Merged

Update transformers and sentence transformers docs#18925
BenWilson2 merged 6 commits intomlflow:masterfrom
BenWilson2:cleanup-transformers-docs

Conversation

@BenWilson2
Copy link
Member

@BenWilson2 BenWilson2 commented Nov 19, 2025

🛠 DevTools 🛠

Open in GitHub Codespaces

Install mlflow from this PR

# mlflow
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/18925/merge
# mlflow-skinny
pip install git+https://github.com/mlflow/mlflow.git@refs/pull/18925/merge#subdirectory=libs/skinny

For Databricks, use the following command:

%sh curl -LsSf https://raw.githubusercontent.com/mlflow/mlflow/HEAD/dev/install-skinny.sh | sh -s pull/18925/merge

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Standardize and cleanup junk marketing fluff from transformers / sentence transformers docs.

How is this PR tested?

  • Existing unit/integration tests
  • New unit/integration tests
  • Manual tests

Does this PR require documentation update?

  • No. You can skip the rest of this section.
  • Yes. I've updated:
    • Examples
    • API references
    • Instructions

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.
  • Yes. Give a description of this change to be included in the release notes for MLflow users.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • area/tracking: Tracking Service, tracking client APIs, autologging
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflows
  • area/gateway: MLflow AI Gateway client APIs, server, and third-party integrations
  • area/prompts: MLflow prompt engineering features, prompt templates, and prompt management
  • area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionality
  • area/projects: MLproject format, project running backends
  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages

How should the PR be classified in the release notes? Choose one:

  • rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • rn/feature - A new user-facing feature worth mentioning in the release notes
  • rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • rn/documentation - A user-facing documentation change worth mentioning in the release notes

Should this PR be included in the next patch release?

Yes should be selected for bug fixes, documentation updates, and other small changes. No should be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.

What is a minor/patch release?
  • Minor release: a release that increments the second part of the version number (e.g., 1.2.0 -> 1.3.0).
    Bug fixes, doc updates and new features usually go into minor releases.
  • Patch release: a release that increments the third part of the version number (e.g., 1.2.0 -> 1.2.1).
    Bug fixes and doc updates usually go into patch releases.
  • Yes (this PR will be cherry-picked and included in the next patch release)
  • No (this PR will be included in the next minor release)

Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
@github-actions github-actions bot added area/docs Documentation issues rn/documentation Mention under Documentation Changes in Changelogs. v3.6.1 labels Nov 19, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

Documentation preview for 1136158 is available at:

Changed Pages (5)

More info
  • Ignore this comment if this PR does not change the documentation.
  • The preview is updated when a new commit is pushed to this PR.
  • This comment was created by this workflow run.
  • The documentation was built by this workflow run.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request standardizes and cleans up the Transformers and Sentence Transformers documentation by removing marketing language, consolidating pages, and providing more focused, practical examples.

Key Changes

  • Simplified navigation structure by consolidating Sentence Transformers guides and tutorials into a single page
  • Rewrote documentation to be more concise and focused on practical usage
  • Removed version-specific notes that are no longer relevant
  • Updated redirects to maintain backward compatibility with old URLs

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/sidebarsClassicML.ts Simplified Sentence Transformers navigation from category to single doc
docs/docusaurus.config.ts Updated redirects for consolidated Sentence Transformers pages
docs/docs/classic-ml/deep-learning/transformers/index.mdx Cleaned up marketing language, added structured sections with clearer examples
docs/docs/classic-ml/deep-learning/transformers/guide/index.mdx Removed outdated version-specific notes
docs/docs/classic-ml/deep-learning/sentence-transformers/index.mdx Complete rewrite with practical examples and consolidated content
docs/docs/classic-ml/deep-learning/sentence-transformers/guide/index.mdx Removed (content consolidated into main page)
docs/docs/classic-ml/deep-learning/sentence-transformers/tutorials/index.mdx Removed (content consolidated into main page)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- 🔍 Build advanced semantic search systems with re-ranking and relevance optimization
- 📦 Create custom model flavors for specialized architectures and deployment requirements
- 🎨 Develop comprehensive evaluation frameworks for semantic quality assessment
```python
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing import statements. The code block uses mlflow and SentenceTransformer but doesn't import them. For a standalone example, it should include: import mlflow and from sentence_transformers import SentenceTransformer before the import time statement.

Suggested change
```python
```python
import mlflow
from sentence_transformers import SentenceTransformer

Copilot uses AI. Check for mistakes.
```python
# Fine-tune for your domain
from sentence_transformers import SentenceTransformer, InputExample, losses
from sentence_transformers import InputExample, losses
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing import statements. The code block uses mlflow and SentenceTransformer but doesn't import them. For a standalone example, it should include: import mlflow and from sentence_transformers import SentenceTransformer.

Suggested change
from sentence_transformers import InputExample, losses
import mlflow
from sentence_transformers import SentenceTransformer, InputExample, losses

Copilot uses AI. Check for mistakes.
Comment on lines +241 to +246
```python
models_to_compare = [
"all-MiniLM-L6-v2",
"all-mpnet-base-v2",
"paraphrase-albert-small-v2",
]
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing import statements. The code block uses mlflow, SentenceTransformer, pd (pandas), and time but doesn't import them. For a standalone example, it should include all necessary imports: import mlflow, import pandas as pd, import time, and from sentence_transformers import SentenceTransformer.

Copilot uses AI. Check for mistakes.
@BenWilson2 BenWilson2 added team-review Trigger a team review request and removed team-review Trigger a team review request labels Nov 20, 2025
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Comment on lines +41 to +44
icon: Zap,
title: "Autologging",
description: "Automatic tracking of training metrics and parameters",
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't support autologging?

Perhaps our trainer logger for transformers may work, but then can we have a guide for that in that page.

- 🧬 **Scientific Literature Analysis**: Analyze research papers, patents, and technical documents for similarity, trends, and knowledge gaps

## Complete Learning Journey
## Batch Processing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this example? This doesn't seem to be using any special mlflow feature.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep will delete

```

</details>
## Model Comparison
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to show comparison use case, I guess we should use eval? (or maybe can just remove)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'm just going to remove it.

@@ -202,10 +202,6 @@ print(response)

## Saving Prompt Templates with Transformer Pipelines
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we actually remove this guide? We should now recommend prompt registry rather than logging it directly in the model.

<CardGroup>
<PageCard
headerText="Sentence Transformers Quickstart"
link="/ml/deep-learning/sentence-transformers/tutorials/quickstart/sentence-transformers-quickstart/"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add these tutorial pages in the sidebar

tracking to model deployment. This combination offers a robust and efficient pathway for incorporating advanced NLP and AI capabilities
into your applications.
```bash
pip install mlflow[transformers]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pip install mlflow[transformers]
pip install mlflow transformers

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on adding a quick section about report_to="mlflow" in the transformers library as autologging feature?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call! Will add

Copy link
Collaborator

@B-Step62 B-Step62 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM but left a few comments to be addressed before merging

Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
@BenWilson2 BenWilson2 added this pull request to the merge queue Dec 3, 2025
Merged via the queue into mlflow:master with commit a6f55d0 Dec 3, 2025
46 checks passed
@BenWilson2 BenWilson2 deleted the cleanup-transformers-docs branch December 3, 2025 14:33
BenWilson2 added a commit to BenWilson2/mlflow that referenced this pull request Dec 4, 2025
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
BenWilson2 added a commit that referenced this pull request Dec 4, 2025
Signed-off-by: Ben Wilson <benjamin.wilson@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation issues rn/documentation Mention under Documentation Changes in Changelogs. team-review Trigger a team review request v3.7.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants