mlflow / mlflow

Open source platform for the machine learning lifecycle
https://mlflow.org
Apache License 2.0
18.93k stars 4.26k forks source link

[FR] Configure MLFlow logging level using an environment variable #13216

Open Flametaa opened 2 months ago

Flametaa commented 2 months ago

Willingness to contribute

Yes. I can contribute this feature independently.

Proposal Summary

I would like to be able to configure default MLFlow logging level in scripts using an environment variable, rather than fetching the mlflow logger and setting the level using python as defined in https://mlflow.org/docs/latest/python_api/index.html#log-levels.

Motivation

What is the use case for this feature?

I want to inject this configuration by default in all MLFlow scripts so that the users will have a default configuration that is defined by the admins.

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

Centralizing configuration in environment variables will make it easier to enforce standardization and to easily configure MLFlow features.

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

This will allow us to define the MLFlow logging level in all projects by injecting the variables by default in MLFlow scripts

Why is it currently difficult to achieve this use case?

Users currently have to define the logging level manually in every script as defined in https://mlflow.org/docs/latest/python_api/index.html#log-levels. The logging level defaults to info which logs a lot of unnecessary information when we are executing the script in a non interactive environment.

Details

No response

What component(s) does this bug affect?

What interface(s) does this bug affect?

What language(s) does this bug affect?

What integration(s) does this bug affect?

B-Step62 commented 2 months ago

Hi @Flametaa, the proposal makes sense to me! Would you be interested in opening a PR for this feature? Here are some pointers to get started:

github-actions[bot] commented 2 months ago

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

karthikkurella commented 2 months ago

@B-Step62 , I can start working on implementation and raise a PR for the design above. Please take a look. Thank you.

steveepreston commented 1 month ago

+1