Skip to content

add configurable prefix #2625

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 5 additions & 3 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
from torch.utils._triton import has_triton, has_triton_package
from torch.utils.hooks import RemovableHandle

from . import config
from .graph_utils import _get_flat_args


Expand All @@ -117,8 +118,6 @@
from torch._guards import detect_fake_mode # noqa: F401
from torch._logging import LazyString

from . import config

# NOTE: Make sure `NP_SUPPORTED_MODULES` and `NP_TO_TNP_MODULE` are in sync.
if np:
NP_SUPPORTED_MODULES: tuple[types.ModuleType, ...] = (
Expand Down Expand Up @@ -1691,7 +1690,10 @@ def __init__(self):
self.tls = threading.local()
# Generate a unique id for this logger, which we can use in scuba to filter down
# to a single python run.
self.id_ = str(uuid.uuid4())
if config.pt2_compile_id_prefix:
self.id_ = f"{config.pt2_compile_id_prefix}-{uuid.uuid4()}"
else:
self.id_ = str(uuid.uuid4())

# TODO: log to init/id tlparse after I add support for it
log.info("ChromiumEventLogger initialized with id %s", self.id_)
Expand Down
Loading