Skip to content

Commit 5018404

Browse files
c00wfacebook-github-bot
authored andcommitted
inductor_config_logging: Don't drop keys (#144700)
Summary: This bit me while I was trying to debug some trace issues. In general this config is already quite large when dumping, so adding more fields doesn't make it significantly worse. Also a number of the items we are type checking for (except the test configs), don't even show up. Primarily this will help us when debugging rocm, halide, and trace configs. X-link: pytorch/pytorch#144700 Approved by: https://github.com/ezyang Reviewed By: ZainRizvi Differential Revision: D68746502 fbshipit-source-id: d441bb6e39d8e5d38ee1386ebcca5f4ad00c896b
1 parent 8e6edf8 commit 5018404

File tree

1 file changed

+3
-3
lines changed
  • userbenchmark/dynamo/dynamobench/_dynamo

1 file changed

+3
-3
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
Generic,
4545
Optional,
4646
overload,
47+
Set,
4748
TypeVar,
4849
Union,
4950
)
@@ -1332,16 +1333,15 @@ def default(self, o):
13321333
except Exception:
13331334
return "Value is not JSON serializable"
13341335

1335-
configs_to_scrub_re = r"((^TYPE_CHECKING$)|(.*_progress$)|(.*TESTING.*)|(.*(rocm|halide).*)|(^trace\..*)|(^_))"
1336-
keys_to_scrub = set()
1336+
keys_to_scrub: Set[Any] = set()
13371337
inductor_conf_str = None
13381338
inductor_config_copy = (
13391339
torch._inductor.config.get_config_copy() if torch._inductor.config else None
13401340
)
13411341
if inductor_config_copy is not None:
13421342
try:
13431343
for key, val in inductor_config_copy.items():
1344-
if not isinstance(key, str) or re.search(configs_to_scrub_re, key):
1344+
if not isinstance(key, str):
13451345
keys_to_scrub.add(key)
13461346
# Convert set() to list for json.dumps()
13471347
if isinstance(val, set):

0 commit comments

Comments
 (0)