yocto-gl icon indicating copy to clipboard operation
yocto-gl copied to clipboard

[BUG] MLFlow logger prevents airflow log handler from writing remote logs

Open jsnb-devoted opened this issue 3 years ago • 7 comments

Thank you for submitting an issue. Please refer to our issue policy for additional information about bug reports. For help with debugging your code, please refer to Stack Overflow.

Please fill in this bug report template to ensure a timely and thorough response.

Willingness to contribute

The MLflow Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the MLflow code base?

  • [ ] Yes. I can contribute a fix for this bug independently.
  • [ ] Yes. I would be willing to contribute a fix for this bug with guidance from the MLflow community.
  • [x] No. I cannot contribute a bug fix at this time.

System information

  • Have I written custom code (as opposed to using a stock example script provided in MLflow):
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • MLflow installed from (source or binary):
  • MLflow version (run mlflow --version): 1.20.2 (skinny)
  • Python version: 3.8.8
  • npm version, if running the dev UI:
  • Exact command to reproduce: in an airflow DAG/python file
import mlflow

Describe the problem

We are using Airflow to orchestrate some operations against our MLFlow deployment. All DAGs that import MLFlow fail to

Code to reproduce issue

python dag file:

import mlflow

def train_model():
  # ...
  pass

with DAG("my_dag",
  start_date=datetime(2021, 1 ,1),
  schedule_interval='@daily',
) as dag:
  PythonOperator(
    task_id=f"training_model",
    python_callable=train_model,
  )

The tasks in this dag will execute but it appears to overwrite the existing logging handlers and prevent all tasks within the DAG from sending the logs to s3 on close

Other info / logs

An issue was opened in the airflow project but airflow maintainers think that it is an issue with the MLFlow logging code. https://github.com/apache/airflow/issues/12236

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

Components

  • [ ] 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/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • [ ] area/models: MLmodel format, model serialization/deserialization, flavors
  • [ ] 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

jsnb-devoted avatar Oct 28 '21 16:10 jsnb-devoted