Skip to content

Commit 7aacd61

Browse files
c00wmeta-codesync[bot]
authored andcommitted
inductor_provenance: Correctly handle null provenance
Summary: X-link: pytorch/pytorch#166019 If the provenance is null, we're getting crashes of the form ``` [trainers0]:E1021 10:51:31.990525 2752 PythonApi.h:87] Exception caught in GeneratedDynamoCompileLoggerConfig: <class 'dsi.logger.py3.GeneratedDynamoCompile.LogEntry.thrift_types.GeneratedDynamoCompileLogEntryThriftBase'>: error initializing Thrift struct field 'inductor_provenance_thrift_safe': Cannot create internal string data representation. Expected type <class 'str'>, got: <class 'NoneType'>. ``` Also fixed a type signature that wasn't being enforced. (It's still not enforced, but it's accurate). Reviewed By: ppanchalia Differential Revision: D85173596 fbshipit-source-id: cccd7a8a3a840d7938083dbd7d029e761fd616b2
1 parent ca8948f commit 7aacd61

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

userbenchmark/dynamo/dynamobench/_dynamo/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ class CompilationMetrics:
13771377
recompile_user_contexts: Optional[set[str]] = None
13781378
inline_inbuilt_nn_modules_candidate: Optional[bool] = False
13791379
pytorch_version: Optional[str] = None
1380-
inductor_provenance: Optional[str] = None
1380+
inductor_provenance: Optional[set[str]] = None
13811381

13821382
@classmethod
13831383
def create(cls, metrics: dict[str, Any]) -> CompilationMetrics:

0 commit comments

Comments
 (0)