File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -4374,12 +4374,20 @@ def __repr__(self) -> str:
43744374 "disabled_custom_ops" : True ,
43754375 "compilation_time" : True ,
43764376 "bs_to_padded_graph_size" : True ,
4377- "pass_config" : True ,
43784377 "traced_files" : True ,
43794378 "inductor_compile_config" : {
43804379 "post_grad_custom_post_pass" : True ,
43814380 },
43824381 }
4382+
4383+ # exclude default attr in pass_config
4384+ pass_config_exclude = {}
4385+ for attr , default_val in vars (PassConfig ()).items ():
4386+ if getattr (self .pass_config , attr ) == default_val :
4387+ pass_config_exclude [attr ] = True
4388+ if pass_config_exclude :
4389+ exclude ["pass_config" ] = pass_config_exclude
4390+
43834391 # The cast to string is necessary because Pydantic is mocked in docs
43844392 # builds and sphinx-argparse doesn't know the return type of decode()
43854393 return str (
You can’t perform that action at this time.
0 commit comments