Skip to content

Migrate Python job in master.yml workflow to uv#18934

Merged
harupy merged 2 commits intomlflow:masterfrom
harupy:migrate-python-job-to-uv
Nov 21, 2025
Merged

Migrate Python job in master.yml workflow to uv#18934
harupy merged 2 commits intomlflow:masterfrom
harupy:migrate-python-job-to-uv

Conversation

@harupy
Copy link
Member

@harupy harupy commented Nov 20, 2025

What changes are proposed in this pull request?

Migrate the Python job in .github/workflows/master.yml to use uv instead of manual venv management and pip, bringing it in line with other jobs in the workflow.

Before (no cache)

image

After (no cache)

image

How is this PR tested?

  • Existing unit/integration tests

Does this PR require documentation update?

  • No. You can skip the rest of this section.

Release Notes

Is this a user-facing change?

  • No. You can skip the rest of this section.

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

Components

  • area/build: Build and test infrastructure for MLflow

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

Should this PR be included in the next patch release?

  • 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)

🤖 Generated with Claude Code

This change migrates the Python job from manual venv management and pip
to uv for faster and more consistent dependency resolution.

Changes:
- Replace manual venv creation with uv sync
- Use uv pip for all package installations
- Use uv run for all Python/pytest commands
- Remove redundant installations (tf-keras, mlflow-test-plugin)
- Simplify extras syntax to --extra 'extras,gateway,mcp'
- Use --with flag for databricks-agents in isolated test step

Benefits:
- Faster dependency resolution
- Consistent with other uv-based jobs (flavors, models, evaluate, etc.)
- Cleaner and more maintainable installation steps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
@github-actions github-actions bot added area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs. labels Nov 20, 2025
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Comment on lines -86 to -88
# Ensure `databricks-connect` and `databricks-agents` are not installed
pip uninstall -y databricks-connect databricks-agents
pip install --no-deps --force-reinstall pyspark
Copy link
Member Author

Choose a reason for hiding this comment

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

This was added because the cache might contain databricks-connect and databricks-agents. We no longer use cache.

Copy link
Collaborator

@serena-ruan serena-ruan left a comment

Choose a reason for hiding this comment

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

LGTM!

@harupy harupy enabled auto-merge November 21, 2025 03:00
@harupy harupy added this pull request to the merge queue Nov 21, 2025
Merged via the queue into mlflow:master with commit 89117fb Nov 21, 2025
50 of 52 checks passed
@harupy harupy deleted the migrate-python-job-to-uv branch November 21, 2025 03:03
kevin-wangg pushed a commit to kevin-wangg/mlflow that referenced this pull request Nov 21, 2025
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Kevin Wang <kevinwang2040@gmail.com>
jimilp7 pushed a commit to backspace-org/mlflow that referenced this pull request Nov 21, 2025
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Tian-Sky-Lan pushed a commit to Tian-Sky-Lan/mlflow that referenced this pull request Nov 24, 2025
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Tian Lan <sky.blue266000@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Build and test infrastructure for MLflow rn/none List under Small Changes in Changelogs. team-review Trigger a team review request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants