Skip to content

Commit

Permalink
updated logger
Browse files Browse the repository at this point in the history
  • Loading branch information
saltykox committed Feb 28, 2022
1 parent 52fd656 commit 3fb9680
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ote_sdk/ote_sdk/utils/argument_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import typing
from abc import ABC, abstractmethod
from os.path import exists
from datetime import datetime
from os.path import exists

import yaml
from numpy import floating
Expand All @@ -21,7 +21,9 @@ def raise_value_error_if_parameter_has_unexpected_type(
):
"""Function raises ValueError exception if parameter has unexpected type"""
time_now = datetime.now()
print(f"!_! started checking {parameter_name} with expected type {expected_type} at {time_now}")
print(
f"!_! started checking {parameter_name} with expected type {expected_type} value:{parameter} at {time_now}"
)
if expected_type == float:
expected_type = (int, float, floating)
if not isinstance(parameter, expected_type):
Expand All @@ -30,7 +32,7 @@ def raise_value_error_if_parameter_has_unexpected_type(
f"Unexpected type of '{parameter_name}' parameter, expected: {expected_type}, actual: {parameter_type}"
)
time_now = datetime.now()
print(f"!_! finished checking {parameter_name} with expected type {expected_type} value:{parameter} at {time_now}")
print(f"!_! finished checking {parameter_name} with expected type {expected_type}")


def check_nested_elements_type(iterable, parameter_name, expected_type):
Expand Down

0 comments on commit 3fb9680

Please sign in to comment.