Skip to content

Commit d45bfa1

Browse files
elvischenvepwalsh
authored andcommitted
[Misc] Remove pass_config from CompilationConfig dump_json excluded (vllm-project#21911)
Signed-off-by: elvischenv <219235043+elvischenv@users.noreply.github.com>
1 parent 37e8a53 commit d45bfa1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

vllm/config.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)