Unverified Commit 7b455cf1 authored by elvischenv's avatar elvischenv Committed by GitHub
Browse files

[Misc] Remove pass_config from CompilationConfig dump_json excluded (#21911)


Signed-off-by: default avatarelvischenv <219235043+elvischenv@users.noreply.github.com>
parent 8a6e108e
...@@ -4374,12 +4374,20 @@ class CompilationConfig: ...@@ -4374,12 +4374,20 @@ class CompilationConfig:
"disabled_custom_ops": True, "disabled_custom_ops": True,
"compilation_time": True, "compilation_time": True,
"bs_to_padded_graph_size": True, "bs_to_padded_graph_size": True,
"pass_config": True,
"traced_files": True, "traced_files": True,
"inductor_compile_config": { "inductor_compile_config": {
"post_grad_custom_post_pass": True, "post_grad_custom_post_pass": True,
}, },
} }
# exclude default attr in pass_config
pass_config_exclude = {}
for attr, default_val in vars(PassConfig()).items():
if getattr(self.pass_config, attr) == default_val:
pass_config_exclude[attr] = True
if pass_config_exclude:
exclude["pass_config"] = pass_config_exclude
# The cast to string is necessary because Pydantic is mocked in docs # The cast to string is necessary because Pydantic is mocked in docs
# builds and sphinx-argparse doesn't know the return type of decode() # builds and sphinx-argparse doesn't know the return type of decode()
return str( return str(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment