def test_logger_file(): logger = logging.get_logger(__name__) assert logger.to_file("testing") is None
"""Dataset. """ from typing import Optional, Tuple import numpy as np import tensorflow as tf import dualing.utils.exception as e from dualing.utils import logging logger = logging.get_logger(__name__) class Dataset: """A Dataset class is responsible for receiving raw data, pre-processing it and persisting batches that will be feed as inputs to the networks. """ def __init__( self, batch_size: Optional[int] = 1, input_shape: Optional[Tuple[int, ...]] = None, normalize: Optional[Tuple[int, int]] = (0, 1), shuffle: Optional[bool] = True, seed: Optional[int] = 0, ): """Initialization method. Args: batch_size: Batch size.
def test_get_logger(): logger = logging.get_logger(__name__) assert logger.name == "test_logging" assert logger.hasHandlers() is True