# Path: tensorboardX/summary.py
# def _clean_tag(name):
#     # In the past, the first argument to summary ops was a tag, which allowed
#     # arbitrary characters. Now we are changing the first argument to be the node
#     # name. This has a number of advantages (users of summary ops now can
#     # take advantage of the tf name scope system) but risks breaking existing
#     # usage, because a much smaller set of characters are allowed in node names.
#     # This function replaces all illegal characters with _s, and logs a warning.
#     # It also strips leading slashes from the name.
#     if name is not None:
#         new_name = _INVALID_TAG_CHARACTERS.sub('_', name)
#         new_name = new_name.lstrip('/')  # Remove leading slashes
#         if new_name != name:
#             logging.info(
#                 'Summary name %s is illegal; using %s instead.' % (name, new_name))
#             name = new_name
#     return name


import logging
import json
import functools
import numpy as np
    import comet_ml
from io import BytesIO
from google.protobuf.json_format import MessageToJson
from .summary import _clean_tag
    from PIL import Image
try:
    comet_installed = True
except ImportError:
    comet_installed = False


class CometLogger:

# Path: tensorboardX/summary.py
# def _clean_tag(name):
#     # In the past, the first argument to summary ops was a tag, which allowed
#     # arbitrary characters. Now we are changing the first argument to be the node
#     # name. This has a number of advantages (users of summary ops now can
#     # take advantage of the tf name scope system) but risks breaking existing
#     # usage, because a much smaller set of characters are allowed in node names.
#     # This function replaces all illegal characters with _s, and logs a warning.
#     # It also strips leading slashes from the name.
#     if name is not None:
#         new_name = _INVALID_TAG_CHARACTERS.sub('_', name)
#         new_name = new_name.lstrip('/')  # Remove leading slashes
#         if new_name != name:
#             logging.info(
#                 'Summary name %s is illegal; using %s instead.' % (name, new_name))
#             name = new_name
#     return name


# Path: tensorboardX/comet_utils.py
import logging
import json
import functools
import numpy as np
    import comet_ml
from io import BytesIO
from google.protobuf.json_format import MessageToJson
from .summary import _clean_tag
    from PIL import Image

try:
    comet_installed = True
except ImportError:
    comet_installed = False


class CometLogger:

    def __init__(self, comet_config={"disabled": True}):