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

[FR] set_experiment not safe for concurrency #10334

Open
1 of 22 tasks
amueller opened this issue Nov 9, 2023 · 1 comment
Open
1 of 22 tasks

[FR] set_experiment not safe for concurrency #10334

amueller opened this issue Nov 9, 2023 · 1 comment
Labels
area/tracking Tracking service, tracking client APIs, autologging enhancement New feature or request

Comments

@amueller
Copy link
Contributor

amueller commented Nov 9, 2023

Willingness to contribute

Yes. I would be willing to contribute this feature with guidance from the MLflow community.

Proposal Summary

Currently calling set_experiment with a new experiment name in multiple processes in parallel can lead to concurrency issues, in that all the processes will look for the experiment, not find it, try to create it, and all but one will find that it has already been created and error out.
It would be nice to catch the error and try to retrieve the experiment again once it already exists.

Motivation

What is the use case for this feature?

I'm doing hyper-parameter optimization in parallel, and I create the experiment on the workers. I could also ensure the experiment is created prior to calling the workers on the head node, but it seem like this would be easy to do as a feature in MLFlow.

Why is this use case valuable to support for MLflow users in general?

Having multiple workers try to access a non-existing experiment in parallel seems like a common scenario.

Why is this use case valuable to support for your project(s) or organization?

Currently I do a retry in my code. That seems the wrong place to do the retry. I'd rather not have mlflow specific logic in my application.

Why is it currently difficult to achieve this use case?

Not very difficult, but it seems more appropriate to support in mlflow directly (according to my understanding of mlflow scope, which is not very extensive)

Details

No response

What component(s) does this bug affect?

  • area/artifacts: Artifact stores and artifact logging
  • area/build: Build and test infrastructure for MLflow
  • area/docs: MLflow documentation pages
  • area/examples: Example code
  • area/gateway: AI Gateway service, Gateway client APIs, third-party Gateway integrations
  • 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

What interface(s) does this bug affect?

  • 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

What language(s) does this bug affect?

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

What integration(s) does this bug affect?

  • integrations/azure: Azure and Azure ML integrations
  • integrations/sagemaker: SageMaker integrations
  • integrations/databricks: Databricks integrations
@amueller amueller added the enhancement New feature or request label Nov 9, 2023
@github-actions github-actions bot added the area/tracking Tracking service, tracking client APIs, autologging label Nov 9, 2023
Copy link

@mlflow/mlflow-team Please assign a maintainer and start triaging this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracking Tracking service, tracking client APIs, autologging enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant