Skip to content

Commit 3233e41

Browse files
coconutrubenfacebook-github-bot
authored andcommitted
add configurable prefix (#2625)
Summary: X-link: pytorch/pytorch#157678 # Why make experiments easier to find # What - dynamo config to provide a prefix - use the prefix when sending data to scuba through the self.id_ field Reviewed By: stashuk-olek Differential Revision: D77837550
1 parent 51ed229 commit 3233e41

File tree

1 file changed

+7
-1
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+7
-1
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,9 +1713,15 @@ def get_event_data(self) -> dict[str, Any]:
17131713

17141714
def __init__(self):
17151715
self.tls = threading.local()
1716+
1717+
from . import config
1718+
17161719
# Generate a unique id for this logger, which we can use in scuba to filter down
17171720
# to a single python run.
1718-
self.id_ = str(uuid.uuid4())
1721+
if config.pt2_compile_id_prefix:
1722+
self.id_ = f"{config.pt2_compile_id_prefix}-{uuid.uuid4()}"
1723+
else:
1724+
self.id_ = str(uuid.uuid4())
17191725

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

0 commit comments

Comments
 (0)