From e5a58beb670ad97896f30ca5582d771e1abd0966 Mon Sep 17 00:00:00 2001 From: Rahul Tuli Date: Thu, 21 Dec 2023 09:38:24 -0500 Subject: [PATCH] [Move] logger into it's own package (#1924) improves structure and separation of concerns --- src/sparseml/core/logger/__init__.py | 15 +++++++++++++++ src/sparseml/core/{ => logger}/logger.py | 0 tests/sparseml/core/logger/__init__.py | 13 +++++++++++++ tests/sparseml/core/{ => logger}/test_logger.py | 2 +- 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/sparseml/core/logger/__init__.py rename src/sparseml/core/{ => logger}/logger.py (100%) create mode 100644 tests/sparseml/core/logger/__init__.py rename tests/sparseml/core/{ => logger}/test_logger.py (98%) diff --git a/src/sparseml/core/logger/__init__.py b/src/sparseml/core/logger/__init__.py new file mode 100644 index 00000000000..0831d9c6602 --- /dev/null +++ b/src/sparseml/core/logger/__init__.py @@ -0,0 +1,15 @@ +# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# flake8: noqa +from .logger import * diff --git a/src/sparseml/core/logger.py b/src/sparseml/core/logger/logger.py similarity index 100% rename from src/sparseml/core/logger.py rename to src/sparseml/core/logger/logger.py diff --git a/tests/sparseml/core/logger/__init__.py b/tests/sparseml/core/logger/__init__.py new file mode 100644 index 00000000000..0c44f887a47 --- /dev/null +++ b/tests/sparseml/core/logger/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/tests/sparseml/core/test_logger.py b/tests/sparseml/core/logger/test_logger.py similarity index 98% rename from tests/sparseml/core/test_logger.py rename to tests/sparseml/core/logger/test_logger.py index d26fe3bee42..86603cb8e2b 100644 --- a/tests/sparseml/core/test_logger.py +++ b/tests/sparseml/core/logger/test_logger.py @@ -19,7 +19,7 @@ import pytest -from sparseml.core.logger import ( +from sparseml.core import ( LambdaLogger, LoggerManager, PythonLogger,