Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import AutoLoggerConfig and ConsoleSink separatly #567

Merged
merged 4 commits into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging.config
from typing import Union

from super_gradients.common.auto_logging import AutoLoggerConfig
from super_gradients.common.auto_logging.auto_logger import AutoLoggerConfig


def get_logger(logger_name: str, log_level: Union[str, None] = None) -> logging.Logger:
Expand Down
4 changes: 0 additions & 4 deletions src/super_gradients/common/auto_logging/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
from super_gradients.common.auto_logging.auto_logger import AutoLoggerConfig
from super_gradients.common.auto_logging.console_logging import ConsoleSink

__all__ = ["AutoLoggerConfig", "ConsoleSink"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import logging
import atexit

from super_gradients.common.auto_logging.console_logging import ConsoleSink

from super_gradients.common.environment.ddp_utils import multi_process_safe, is_distributed
from super_gradients.common.crash_handler.exception import ExceptionInfo
from super_gradients.common.auto_logging.console_logging import ConsoleSink

try:
from deci_lab_client.client import DeciPlatformClient
Expand Down
3 changes: 2 additions & 1 deletion src/super_gradients/common/sg_loggers/base_sg_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
from PIL import Image
from super_gradients.common import ADNNModelRepositoryDataInterfaces
from super_gradients.common.abstractions.abstract_logger import get_logger
from super_gradients.common.auto_logging import AutoLoggerConfig, ConsoleSink
from super_gradients.common.environment.ddp_utils import multi_process_safe
from super_gradients.common.sg_loggers.abstract_sg_logger import AbstractSGLogger
from super_gradients.training.params import TrainingParams
from super_gradients.training.utils import sg_trainer_utils
from super_gradients.common.environment.monitoring import SystemMonitor
from super_gradients.common.auto_logging.auto_logger import AutoLoggerConfig
from super_gradients.common.auto_logging.console_logging import ConsoleSink

logger = get_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/train_logging_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from super_gradients import Trainer
from super_gradients.common.auto_logging import AutoLoggerConfig
from super_gradients.common.auto_logging.auto_logger import AutoLoggerConfig
from super_gradients.training.dataloaders.dataloaders import classification_test_dataloader
from super_gradients.training.metrics import Accuracy, Top5
from super_gradients.training.models import ResNet18
Expand Down