Skip to content

mlflow-go server fails with AttributeError: module 'mlflow' has no attribute 'server' #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2025

Conversation

joelrobin18
Copy link
Contributor

Fix #134

Actual behavior:
The CLI references mlflow.server.file in mlflow_go_backend/cli.py without ever importing the mlflow.server submodule, so Python raises an AttributeError and exits.

Expected behavior:
The server should import the mlflow.server module, locate the static folder, initialize the backend store, and start serving the MLflow UI without error.

Root cause:
mlflow.server is never imported, so it isn’t attached to the mlflow namespace. Accessing mlflow.server.file therefore fails.

Proposed fix:
Add an explicit import mlflow.server at the top of mlflow_go_backend/cli.py to ensure mlflow.server exists before accessing its attributes.

Signed-off-by: joelrobin18 <[email protected]>
@joelrobin18 joelrobin18 changed the title Fix-134 mlflow-go server fails with AttributeError: module 'mlflow' has no attribute 'server' May 19, 2025
Signed-off-by: nojaf <[email protected]>
Copy link
Collaborator

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Hello @joelrobin18,

Thank you for trying out Mlflow Go! We apologize that this has been your first experience.

I was able to reproduce the problem and verify your fix. This looks reasonable to me.

CI is failing on main, and we will look into that separately.

We can publish this fix shortly after it is merged.

@nojaf nojaf merged commit e04f2c4 into mlflow:main May 20, 2025
8 checks passed
@nojaf
Copy link
Collaborator

nojaf commented May 20, 2025

Turns out we need to fix CI before we can release another version.
We will try to do this this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mlflow-go server fails with AttributeError: module 'mlflow' has no attribute 'server'
2 participants