mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Make the name assert actually do something, and reserve some more names (#157342)
Signed-off-by: Edward Yang <ezyang@meta.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/157342 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
db188503cb
commit
6442ae9256
@ -1235,12 +1235,16 @@ def trace_structured(
|
||||
payload is an arbitrary string, which can be arbitrarily long (but expected to have
|
||||
newlines so no lines are too long)
|
||||
"""
|
||||
assert "name" not in [
|
||||
assert name not in [
|
||||
"rank",
|
||||
"compiled_autograd_id",
|
||||
"frame_id",
|
||||
"frame_compile_id",
|
||||
"attempt",
|
||||
"severity",
|
||||
"timestamp",
|
||||
"pathname",
|
||||
"thread",
|
||||
]
|
||||
assert callable(metadata_fn), (
|
||||
f"metadata_fn should be callable, but got {type(metadata_fn)}"
|
||||
|
Reference in New Issue
Block a user