diff --git a/mlflow/__init__.py b/mlflow/__init__.py index 41291b8f6e833..ca12b2c9058f2 100644 --- a/mlflow/__init__.py +++ b/mlflow/__init__.py @@ -37,34 +37,34 @@ # See: https://github.com/numpy/numpy/pull/432/commits/170ed4e33d6196d7 import warnings -warnings.filterwarnings("ignore", message="numpy.dtype size changed") # noqa: E402 -warnings.filterwarnings("ignore", message="numpy.ufunc size changed") # noqa: E402 +warnings.filterwarnings("ignore", message="numpy.dtype size changed") +warnings.filterwarnings("ignore", message="numpy.ufunc size changed") -import mlflow.projects as projects # noqa: E402 -import mlflow.tracking as tracking # noqa: E402 +import mlflow.projects as projects +import mlflow.tracking as tracking # model flavors _model_flavors_supported = [] try: # pylint: disable=unused-import - import mlflow.catboost as catboost # noqa: E402 - import mlflow.fastai as fastai # noqa: E402 - import mlflow.gluon as gluon # noqa: E402 - import mlflow.h2o as h2o # noqa: E402 - import mlflow.keras as keras # noqa: E402 - import mlflow.lightgbm as lightgbm # noqa: E402 - import mlflow.mleap as mleap # noqa: E402 - import mlflow.onnx as onnx # noqa: E402 - import mlflow.pyfunc as pyfunc # noqa: E402 - import mlflow.pytorch as pytorch # noqa: E402 - import mlflow.sklearn as sklearn # noqa: E402 - import mlflow.spacy as spacy # noqa: E402 - import mlflow.spark as spark # noqa: E402 - import mlflow.statsmodels as statsmodels # noqa: E402 - import mlflow.tensorflow as tensorflow # noqa: E402 - import mlflow.xgboost as xgboost # noqa: E402 - import mlflow.shap as shap # noqa: E402 - import mlflow.pyspark as pyspark # noqa: E402 + import mlflow.catboost as catboost + import mlflow.fastai as fastai + import mlflow.gluon as gluon + import mlflow.h2o as h2o + import mlflow.keras as keras + import mlflow.lightgbm as lightgbm + import mlflow.mleap as mleap + import mlflow.onnx as onnx + import mlflow.pyfunc as pyfunc + import mlflow.pytorch as pytorch + import mlflow.sklearn as sklearn + import mlflow.spacy as spacy + import mlflow.spark as spark + import mlflow.statsmodels as statsmodels + import mlflow.tensorflow as tensorflow + import mlflow.xgboost as xgboost + import mlflow.shap as shap + import mlflow.pyspark as pyspark import mlflow.paddle as paddle import mlflow.prophet as prophet diff --git a/mlflow/sagemaker/__init__.py b/mlflow/sagemaker/__init__.py index 5e0f4d69c4ead..a813cd8360468 100644 --- a/mlflow/sagemaker/__init__.py +++ b/mlflow/sagemaker/__init__.py @@ -1575,8 +1575,8 @@ def status_check_fn(): failure_reason = endpoint_info.get( "FailureReason", ( - "An unknown SageMaker failure occurred. \ - Please see the SageMaker console logs for" # noqa + "An unknown SageMaker failure occurred." + " Please see the SageMaker console logs for" " more information." ), ) diff --git a/mlflow/utils/autologging_utils/__init__.py b/mlflow/utils/autologging_utils/__init__.py index fb60df33d5d33..eacaabb1163f7 100644 --- a/mlflow/utils/autologging_utils/__init__.py +++ b/mlflow/utils/autologging_utils/__init__.py @@ -16,15 +16,15 @@ _logger = logging.getLogger(__name__) # Import autologging utilities used by this module -from mlflow.utils.autologging_utils.logging_and_warnings import ( # noqa: E402 +from mlflow.utils.autologging_utils.logging_and_warnings import ( set_mlflow_events_and_warnings_behavior_globally, set_non_mlflow_warnings_behavior_for_current_thread, ) -from mlflow.utils.autologging_utils.safety import ( # noqa: E402 +from mlflow.utils.autologging_utils.safety import ( update_wrapper_extended, revert_patches, ) -from mlflow.utils.autologging_utils.versioning import ( # noqa: E402 +from mlflow.utils.autologging_utils.versioning import ( FLAVOR_TO_MODULE_NAME_AND_VERSION_INFO_KEY, get_min_max_version_and_pip_release, is_flavor_supported_for_associated_package_versions, @@ -33,9 +33,9 @@ # Wildcard import other autologging utilities (e.g. safety utilities, event logging utilities) used # in autologging integration implementations, which reference them via the # `mlflow.utils.autologging_utils` module -from mlflow.utils.autologging_utils.safety import * # noqa: E402 -from mlflow.utils.autologging_utils.events import * # noqa: E402 -from mlflow.utils.autologging_utils.client import * # noqa: E402 +from mlflow.utils.autologging_utils.safety import * +from mlflow.utils.autologging_utils.events import * +from mlflow.utils.autologging_utils.client import * INPUT_EXAMPLE_SAMPLE_ROWS = 5 diff --git a/mlflow/utils/file_utils.py b/mlflow/utils/file_utils.py index a7e8e54410e5f..a5e87bedc3d47 100644 --- a/mlflow/utils/file_utils.py +++ b/mlflow/utils/file_utils.py @@ -96,7 +96,7 @@ def find(root, name, full_path=False): return list_all(root, lambda x: x == path_name, full_path) -def mkdir(root, name=None): # noqa +def mkdir(root, name=None): """ Make directory with name "root/name", or just "root" if name is None. diff --git a/tests/entities/test_run_data.py b/tests/entities/test_run_data.py index 139e70b7166f5..5604dab734601 100644 --- a/tests/entities/test_run_data.py +++ b/tests/entities/test_run_data.py @@ -42,8 +42,8 @@ def _create(): step=random_int(), ) ] - params = [Param(random_str(10), random_str(random_int(10, 35))) for _ in range(10)] # noqa - tags = [RunTag(random_str(10), random_str(random_int(10, 35))) for _ in range(10)] # noqa + params = [Param(random_str(10), random_str(random_int(10, 35))) for _ in range(10)] + tags = [RunTag(random_str(10), random_str(random_int(10, 35))) for _ in range(10)] rd = RunData(metrics=metrics, params=params, tags=tags) return rd, metrics, params, tags