Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
ec4a5ee
more
fzyzcjy Feb 20, 2026
6602e67
more
fzyzcjy Feb 20, 2026
e60f7ce
more
fzyzcjy Feb 20, 2026
ab2ac39
more
fzyzcjy Feb 20, 2026
079b9f2
more
fzyzcjy Feb 20, 2026
09d99f3
Rename on_forward_pass_start() to step() and _forward_pass_id to _cur…
fzyzcjy Feb 20, 2026
89d3ac8
Shorten curr_step to step in dump tags, state keys, and internals
fzyzcjy Feb 20, 2026
38da9e0
more
fzyzcjy Feb 20, 2026
14fe78f
Rename env var prefix SGLANG_DUMPER_ to DUMPER_
fzyzcjy Feb 20, 2026
90fe262
more
fzyzcjy Feb 20, 2026
dd9014a
more
fzyzcjy Feb 20, 2026
97474fa
Remove allow_sglang=True from temp_set_env calls for DUMPER_ env vars
fzyzcjy Feb 20, 2026
fe39601
more
fzyzcjy Feb 20, 2026
a2f0603
more
fzyzcjy Feb 20, 2026
989cd19
more
fzyzcjy Feb 20, 2026
db3e88e
more
fzyzcjy Feb 20, 2026
5b4edc4
fmt
fzyzcjy Feb 20, 2026
c0373f4
Merge branch 'ac8402/0' into ac8402/1
fzyzcjy Feb 20, 2026
4ec4d94
more
fzyzcjy Feb 20, 2026
ea4ba60
Add _HookDumper class for non-invasive forward hook tensor dumping
fzyzcjy Feb 20, 2026
54e76e5
more
fzyzcjy Feb 20, 2026
2ed766a
more
fzyzcjy Feb 20, 2026
ccee418
Remove dump_layers and move module names into _DumperConfig
fzyzcjy Feb 20, 2026
c67e67d
more
fzyzcjy Feb 20, 2026
9072082
more
fzyzcjy Feb 20, 2026
19c2705
Fix _HookDumper bugs: undefined vars and stale kwargs in recursive call
fzyzcjy Feb 20, 2026
ee938e3
more
fzyzcjy Feb 20, 2026
7baf8fd
Refactor _HookDumper: split into _convert_hook_output + restore Forwa…
fzyzcjy Feb 20, 2026
e26543b
more
fzyzcjy Feb 20, 2026
dc1f04f
more
fzyzcjy Feb 20, 2026
f5387ff
Replace _load_special_types dict with inline try/except imports
fzyzcjy Feb 20, 2026
e98c81b
more
fzyzcjy Feb 20, 2026
3c42d89
more
fzyzcjy Feb 20, 2026
b110c32
Replace manual recursion with named_modules() in _HookDumper
fzyzcjy Feb 20, 2026
b7464f1
more
fzyzcjy Feb 20, 2026
5c28453
more
fzyzcjy Feb 20, 2026
d964c9d
more
fzyzcjy Feb 20, 2026
f53beb3
more
fzyzcjy Feb 20, 2026
0636cbe
Add test for intermediate container hook skipping
fzyzcjy Feb 20, 2026
84c2b2f
Use explicit .output/.inputs prefix in hook dump names
fzyzcjy Feb 20, 2026
a6127b9
Hook root module directly, remove top_level_module_name config
fzyzcjy Feb 20, 2026
1469632
more
fzyzcjy Feb 20, 2026
a69468c
more
fzyzcjy Feb 20, 2026
3ee0006
Add hook__ prefix and dump inputs for all hooked modules
fzyzcjy Feb 20, 2026
4bcaafe
Hook all modules, not just root + leaves
fzyzcjy Feb 20, 2026
a485a22
Index input args in hook dump names to avoid overwrites
fzyzcjy Feb 20, 2026
27aae31
more
fzyzcjy Feb 20, 2026
90919f1
more
fzyzcjy Feb 20, 2026
d2b5373
more
fzyzcjy Feb 20, 2026
5a4af07
more
fzyzcjy Feb 20, 2026
9798162
more
fzyzcjy Feb 20, 2026
425131b
Rewrite TestHookDumper with comprehensive coverage
fzyzcjy Feb 20, 2026
cb84f27
Fix formatting from pre-commit (isort, ruff, black)
fzyzcjy Feb 20, 2026
ac98a08
Rename _HookDumper to _NonIntrusiveDumper with non_intrusive__ prefix
fzyzcjy Feb 20, 2026
4c47bba
Move _make_hook_model into TestNonIntrusiveDumper as _wrap_as_outer
fzyzcjy Feb 20, 2026
ee02835
Rename register_non_intrusive_dumper to register_model_hook
fzyzcjy Feb 20, 2026
f8cb4a6
Revert "Rename register_non_intrusive_dumper to register_model_hook"
fzyzcjy Feb 20, 2026
937899b
Extract _assert_captured_contains helper in TestNonIntrusiveDumper
fzyzcjy Feb 20, 2026
0bf7c31
more
fzyzcjy Feb 20, 2026
886855a
Add non_intrusive_mode config (off/core/all) for selective tensor dum…
fzyzcjy Feb 20, 2026
ecb70ae
Unify _make_core_hook into _make_forward_hook/_dump_value
fzyzcjy Feb 20, 2026
1e9f3f7
Register hooks on all modules regardless of mode
fzyzcjy Feb 20, 2026
cf8ec01
more
fzyzcjy Feb 20, 2026
643e217
more
fzyzcjy Feb 20, 2026
82a0514
Always dump core fields (input_ids, positions) with clean names
fzyzcjy Feb 20, 2026
1c177b2
Fix pre-commit: black formatting + ruff undefined name
fzyzcjy Feb 20, 2026
e8c0fd1
more
fzyzcjy Feb 20, 2026
2965043
more
fzyzcjy Feb 20, 2026
d18dcbe
more
fzyzcjy Feb 20, 2026
97be804
more
fzyzcjy Feb 20, 2026
02e5805
more
fzyzcjy Feb 20, 2026
f4fab5a
Deduplicate TestNonIntrusiveDumperConfigMode setup
fzyzcjy Feb 20, 2026
d3928ee
Add section comments to TestNonIntrusiveDumperConfigMode assertions
fzyzcjy Feb 20, 2026
dd80aa7
more
fzyzcjy Feb 20, 2026
e2851b2
more
fzyzcjy Feb 20, 2026
e2894d3
more
fzyzcjy Feb 20, 2026
5ef6cd9
more
fzyzcjy Feb 20, 2026
70b62df
more
fzyzcjy Feb 20, 2026
013a115
more
fzyzcjy Feb 20, 2026
98fd1c5
more
fzyzcjy Feb 20, 2026
f3401dd
more
fzyzcjy Feb 20, 2026
b8046c9
more
fzyzcjy Feb 20, 2026
6f82d34
more
fzyzcjy Feb 20, 2026
01f9df3
more
fzyzcjy Feb 20, 2026
fc58348
Integrate dumper.step() and register_non_intrusive_dumper() into sgla…
fzyzcjy Feb 20, 2026
2e7c7ac
more
fzyzcjy Feb 20, 2026
0b1ebb8
more
fzyzcjy Feb 20, 2026
483207e
Use HTTP to enable dumper in e2e test instead of env var
fzyzcjy Feb 20, 2026
a6f0fef
more
fzyzcjy Feb 20, 2026
586fea1
Strengthen e2e dumper test assertions
fzyzcjy Feb 20, 2026
5832ab7
Apply black formatting to e2e test
fzyzcjy Feb 20, 2026
13476e0
Fix e2e test: warm-up request before HTTP configure for ZMQ setup
fzyzcjy Feb 20, 2026
74b542b
Add diagnostic output to e2e test, remove docstring and redundant env
fzyzcjy Feb 20, 2026
5b50dd4
more
fzyzcjy Feb 20, 2026
8756b0b
Add temporary debug logging for e2e test investigation
fzyzcjy Feb 20, 2026
a5d6414
more
fzyzcjy Feb 20, 2026
53f2735
Fix non-intrusive dumper: wrap root forward instead of register_forwa…
fzyzcjy Feb 20, 2026
387546e
more
fzyzcjy Feb 20, 2026
24abebb
Move _ensure_http_server() into register_non_intrusive_dumper
fzyzcjy Feb 21, 2026
d479f2e
Refactor: extract _register_forward_hook_or_replace_fn
fzyzcjy Feb 21, 2026
d861f42
more
fzyzcjy Feb 21, 2026
9b3d3cc
Split non-intrusive hooks into pre-hook (inputs) and post-hook (output)
fzyzcjy Feb 21, 2026
cc1559f
Apply black formatting to pre/post hook split
fzyzcjy Feb 21, 2026
bd6c77b
Revert: remove model_runner integration and may_enable
fzyzcjy Feb 21, 2026
e6c766c
Revert "Revert: remove model_runner integration and may_enable"
fzyzcjy Feb 21, 2026
6293212
Apply black formatting to dump_comparator.py
fzyzcjy Feb 21, 2026
ece5636
Use OS-assigned ports for ZMQ RPC instead of fixed base port
fzyzcjy Feb 21, 2026
2988c17
Add test for concurrent ZMQ port isolation across dumper instances
fzyzcjy Feb 21, 2026
b74d7a6
Clean up exp_name directory during old dump cleanup
fzyzcjy Feb 21, 2026
8f48b83
Use human-readable UTC timestamp for default exp_name
fzyzcjy Feb 21, 2026
8465fc8
Add milliseconds and random suffix to default exp_name
fzyzcjy Feb 21, 2026
5ec5c3b
Change default exp_name format to dump_YYYYMMDD_HHMMSS_mmmRRR
fzyzcjy Feb 21, 2026
d561bf0
Fix _make_test_dumper to allow overriding default kwargs
fzyzcjy Feb 21, 2026
ec9bd24
fmt
fzyzcjy Feb 21, 2026
8c2b0a6
Extract duplicate _worker/_standalone_mode_worker into module-level _…
fzyzcjy Feb 21, 2026
5a3b3c4
Extract _wait_for_http into module-level _wait_for_dumper_http
fzyzcjy Feb 21, 2026
d648706
Add from_kv_pairs / _kv_pairs_to_dict to _DumperConfig
fzyzcjy Feb 21, 2026
982dd7b
Extract _run helper in _NonIntrusiveTestBase to reduce repeated setup
fzyzcjy Feb 21, 2026
a5bddd5
Extract duplicate Layer(layer_number) into module-level _LayerWithNumber
fzyzcjy Feb 21, 2026
b034af2
more
fzyzcjy Feb 21, 2026
a722433
Rename _FrozenConfig to _BaseConfig and move kv parsing to base class
fzyzcjy Feb 21, 2026
8d872ae
Wrap _parse_env_value errors in _kv_pairs_to_dict as TypeError with f…
fzyzcjy Feb 21, 2026
b877dad
Apply black formatting to dumper.py
fzyzcjy Feb 21, 2026
fa1a717
Extract kv-pairs tests into standalone TestKvPairsParsing class
fzyzcjy Feb 21, 2026
4f38c78
more
fzyzcjy Feb 21, 2026
483de09
Change _parse_env_field to classmethod and use cls instead of _BaseCo…
fzyzcjy Feb 21, 2026
93c0c54
Simplify _kv_pairs_to_dict: use defaults dict + sentinel lookup
fzyzcjy Feb 21, 2026
8955976
more
fzyzcjy Feb 21, 2026
babf819
Wrap _parse_env_value errors in _kv_pairs_to_dict as TypeError with f…
fzyzcjy Feb 21, 2026
1557d25
Apply black formatting to dumper.py
fzyzcjy Feb 21, 2026
56752e2
Fix: reset _cleanup_previous_handled on reset() and configure()
fzyzcjy Feb 21, 2026
141cc3b
Revert "Fix: reset _cleanup_previous_handled on reset() and configure()"
fzyzcjy Feb 21, 2026
bfe7712
Extract _Dumper mutable state into _State dataclass
fzyzcjy Feb 21, 2026
98632b3
Move _State to top-level _DumperState; add multi-phase reset tests
fzyzcjy Feb 21, 2026
b01f57c
Simplify cleanup_previous logic: state tracks done, config tracks intent
fzyzcjy Feb 21, 2026
93efc49
Remove _fresh_state: inline _DumperState() directly
fzyzcjy Feb 21, 2026
594123c
more
fzyzcjy Feb 21, 2026
a7025d7
more
fzyzcjy Feb 21, 2026
3a9979c
refactor: _http_manager returns None when no server port configured
fzyzcjy Feb 21, 2026
7066616
more
fzyzcjy Feb 21, 2026
45142c6
refactor: move _handle_http_control_request into _DumperHttpManager
fzyzcjy Feb 21, 2026
ae974be
more
fzyzcjy Feb 21, 2026
017c419
more
fzyzcjy Feb 21, 2026
113ce1e
fmt
fzyzcjy Feb 21, 2026
61e7a84
more
fzyzcjy Feb 21, 2026
13dd918
Move cleanup_previous from lazy _dump_inner to eager configure()
fzyzcjy Feb 21, 2026
251a4e0
Revert "Move cleanup_previous from lazy _dump_inner to eager configur…
fzyzcjy Feb 21, 2026
f2746f8
Wrap cleanup_previous barrier with timeout warning
fzyzcjy Feb 21, 2026
d4c0d30
test(dumper): add TestServerPortParsed for all server_port_parsed bra…
fzyzcjy Feb 21, 2026
635bff3
test(dumper): add TestDefaultExpName to verify exp_name format
fzyzcjy Feb 21, 2026
80455a6
test(dumper): add test_capture_output_nested_raises
fzyzcjy Feb 21, 2026
761c93c
test(dumper): add test_error_unknown_method to TestDumperHttp
fzyzcjy Feb 21, 2026
e374bd3
test(dumper): add test for all-enables-false early return path
fzyzcjy Feb 21, 2026
184d618
test(dumper): add TestGetIntEnvVar for all get_int_env_var branches
fzyzcjy Feb 21, 2026
67fc4a1
test(dumper): add test for unknown hook mode ValueError
fzyzcjy Feb 21, 2026
70a27b7
test(dumper): add _deepcopy_or_clone tests for tensor and non-tensor
fzyzcjy Feb 21, 2026
9c2229a
test(dumper): add test_parameter_saved_as_data to TestDumpModel
fzyzcjy Feb 21, 2026
cc04c35
test(dumper): add test for whitespace env var treated as unset
fzyzcjy Feb 21, 2026
d8b9cfa
style: apply black formatting to test_dumper.py
fzyzcjy Feb 21, 2026
74c2002
fix(dumper): preserve Parameter type in dump, fallback only on pickle…
fzyzcjy Feb 21, 2026
4e8f225
Rename _DumperConfig to DumperConfig
fzyzcjy Feb 21, 2026
5e6c3ef
refactor(dumper): remove unused get_int_env_var from dumper.py
fzyzcjy Feb 21, 2026
175e493
refactor(dumper): extract _strip_parameter from _torch_save
fzyzcjy Feb 21, 2026
8552c2a
Merge remote-tracking branch 'upstream/main' into ac8402/8
fzyzcjy Feb 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Always dump core fields (input_ids, positions) with clean names
Core fields use clean names in both core and all modes. Non-core
fields are only dumped (with prefix) in all mode.
  • Loading branch information
fzyzcjy committed Feb 20, 2026
commit 82a05146e41e51046ee0ba3f3eedf4f22472febf
5 changes: 2 additions & 3 deletions python/sglang/srt/debug_utils/dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,8 @@ def _dump_value(
for key, tensor in self._convert_value(
value, skip_forward_batch=(not is_root)
).items():
if self._mode == "core":
if key in self._CORE_FIELDS:
self._dumper.dump(key, tensor)
if key in self._CORE_FIELDS:
self._dumper.dump(key, tensor)
elif self._mode == "all":
parts = [p for p in (module_name, role, key) if p]
self._dumper.dump(self._NAME_PREFIX + ".".join(parts), tensor)
Expand Down
Loading