Skip to content

Commit

Permalink
Remove warnings.filterwarnings for numpy (#11179)
Browse files Browse the repository at this point in the history
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
  • Loading branch information
harupy committed Feb 19, 2024
1 parent cb6b5bd commit f1db418
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions mlflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,9 @@
"""
import contextlib

# Filter annoying Cython warnings that serve no good purpose, and so before
# importing other modules.
# See: https://github.com/numpy/numpy/pull/432/commits/170ed4e33d6196d7
import warnings
from mlflow.version import VERSION

from mlflow.utils.lazy_load import LazyLoader
from mlflow.utils.logging_utils import _configure_mlflow_loggers
from mlflow.version import VERSION as __version__ # noqa: F401

warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
__version__ = VERSION

from mlflow import (
artifacts, # noqa: F401
Expand All @@ -50,6 +42,8 @@
projects, # noqa: F401
tracking, # noqa: F401
)
from mlflow.utils.lazy_load import LazyLoader
from mlflow.utils.logging_utils import _configure_mlflow_loggers

# Lazily load mlflow flavors to avoid excessive dependencies.
catboost = LazyLoader("mlflow.catboost", globals(), "mlflow.catboost")
Expand Down

0 comments on commit f1db418

Please sign in to comment.