Skip to content
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

fix: importlib.metadata get #10752

Merged
merged 4 commits into from Feb 14, 2024
Merged

Conversation

raphaelauv
Copy link
Contributor

@raphaelauv raphaelauv commented Dec 26, 2023

🛠 DevTools 🛠

Open in GitHub Codespaces

Install mlflow from this PR

pip install git+https://github.com/mlflow/mlflow.git@refs/pull/10752/merge

Checkout with GitHub CLI

gh pr checkout 10752

Related Issues/PRs

Resolve #10752

What changes are proposed in this pull request?

with python 3.12 ->

Traceback (most recent call last):
   File "/usr/local/bin/mlflow", line 5, in <module>
     from mlflow.cli import cli
   File "/usr/local/lib/python3.12/site-packages/mlflow/cli.py", line 356, in <module>
     type=click.Choice([e.name for e in importlib.metadata.entry_points().get("mlflow.app", [])]),
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 AttributeError: 'EntryPoints' object has no attribute 'get'

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/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/deployments: MLflow Deployments client APIs, server, and third-party Deployments integrations
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • area/models: MLmodel format, model serialization/deserialization, flavors
  • area/recipes: Recipes, Recipe APIs, Recipe configs, Recipe Templates
  • area/projects: MLproject format, project running backends
  • area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • area/server-infra: MLflow Tracking server backend
  • area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • area/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
  • area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • area/windows: Windows support

Language

  • language/r: R APIs and clients
  • language/java: Java APIs and clients
  • language/new: Proposals for new client languages

Integrations

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations

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

Copy link

github-actions bot commented Dec 26, 2023

Documentation preview for d46ec74 will be available when this CircleCI job completes successfully.

More info

Copy link

@raphaelauv Thank you for the contribution! Could you fix the following issue(s)?

⚠ DCO check

The 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.

⚠ Invalid PR template

This PR does not appear to have been filed using the MLflow PR template. Please copy the PR template from here and fill it out.

@github-actions github-actions bot added area/server-infra MLflow Tracking server backend rn/bug-fix Mention under Bug Fixes in Changelogs. labels Dec 26, 2023
@raphaelauv raphaelauv force-pushed the fix/entrypoint_get branch 2 times, most recently from 73d7910 to 19dc724 Compare December 26, 2023 23:56
Signed-off-by: raphaelauv <raphaelauv@users.noreply.github.com>
@harupy
Copy link
Member

harupy commented Jan 12, 2024

@mlflow-automation autoformat

@mj0nez
Copy link

mj0nez commented Feb 4, 2024

Hey, how is the status here? :) I've stumpled upon this issue while trying to run the server with 3.12.

@raphaelauv
Copy link
Contributor Author

No news from maintainers

@harupy
Copy link
Member

harupy commented Feb 14, 2024

@raphaelauv sorry for the delay!

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Copy link
Member

@harupy harupy 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 (squash) February 14, 2024 02:35
@harupy harupy merged commit cc184ee into mlflow:master Feb 14, 2024
36 checks passed
@raphaelauv raphaelauv deleted the fix/entrypoint_get branch February 14, 2024 09:16
annzhang-db pushed a commit to annzhang-db/mlflow that referenced this pull request Feb 14, 2024
Signed-off-by: mlflow-automation <mlflow-automation@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: raphaelauv <raphaelauv@users.noreply.github.com>
Co-authored-by: mlflow-automation <mlflow-automation@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
@Gabomfim
Copy link

If you still have this problem now, you can use my fix for now, as it is simpler:

The error is in cli.py, just substitute get("mlflow.app", []) by .select(group="mlflow.app")

The interface changed and an update was needed.

if this still doesn’t work, just assign type=None

sateeshmannar pushed a commit to StateFarmIns/mlflow that referenced this pull request Feb 20, 2024
Signed-off-by: mlflow-automation <mlflow-automation@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: raphaelauv <raphaelauv@users.noreply.github.com>
Co-authored-by: mlflow-automation <mlflow-automation@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
artjen pushed a commit to artjen/mlflow that referenced this pull request Mar 26, 2024
Signed-off-by: mlflow-automation <mlflow-automation@users.noreply.github.com>
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
Co-authored-by: raphaelauv <raphaelauv@users.noreply.github.com>
Co-authored-by: mlflow-automation <mlflow-automation@users.noreply.github.com>
Co-authored-by: harupy <17039389+harupy@users.noreply.github.com>
Signed-off-by: Arthur Jenoudet <arthur.jenoudet@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/server-infra MLflow Tracking server backend rn/bug-fix Mention under Bug Fixes in Changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants