Skip to content

SDK sets log configuration globally in a way that negatively impacts other dependencies #1942

@droctothorpe

Description

@droctothorpe

https://github.com/kubeflow/training-operator/blob/master/sdk/python/kubeflow/training/api/training_client.py#L27-L28
https://github.com/kubeflow/training-operator/blob/master/sdk/python/kubeflow/training/utils/utils.py#L24-L25

These two lines in these two modules configure logging globally in a way that impacts other libraries. I'm using Dask Kubernetes which uses httpx; httpx does a ton of logging to info, which is fine, since Python defaults to a log level of warning, but if I import the training operator SDK, it overwrites the level to info globally, which causes httpx to print a ton of crud.

As far as I can tell, this is only being set in training_client.py and utils.py. Would you object to replacing these log statements with simple print statements, since that doesn't impact other dependencies? Happy to make the contribution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions