Skip to content

Commit

Permalink
Use correct logger in values.py (#1220)
Browse files Browse the repository at this point in the history
Fixes #1211

---------

Co-authored-by: Justin Chu <[email protected]>
  • Loading branch information
AbhiByte and justinchuby authored Dec 13, 2023
1 parent 7428f92 commit b770d42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions onnxscript/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
# A special value to indicate that the default value is not specified
_EmptyDefault = object()

logger = logging.getLogger(__name__)


class Opset:
"""Represents an ONNX Opset, which consists of a domain name, a version.
Expand Down Expand Up @@ -106,7 +108,6 @@ def __getattr__(self, attr: str):

def add_function_def(self, fun):
if fun.name in self.function_defs:
logger = logging.getLogger("onnxscript")
logger.warning("%s: Already defined.", fun.name)
self.function_defs[fun.name] = fun

Expand Down Expand Up @@ -284,7 +285,7 @@ def __init__(
self._param_schemas: Optional[tuple[ParamSchema, ...]] = None

if self._op_schema is None:
logging.debug(
logger.debug(
"An OpSchema was not provided for Op '%s' and "
"there is not one found in opset '%s'.",
opname,
Expand Down

0 comments on commit b770d42

Please sign in to comment.