We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 681c86e commit e829bfeCopy full SHA for e829bfe
test/registered/debug_utils/test_dumper.py
@@ -359,6 +359,16 @@ def test_capture_output_value_cloned(self, tmp_path):
359
tensor.fill_(999.0)
360
assert torch.equal(captured["clone_check"]["value"], torch.zeros(3, 3))
361
362
+ def test_capture_output_respects_filter(self, tmp_path):
363
+ d = _make_test_dumper(tmp_path, filter="^keep")
364
+
365
+ with d.capture_output() as captured:
366
+ d.dump("keep_this", torch.randn(3, 3))
367
+ d.dump("skip_this", torch.randn(3, 3))
368
369
+ assert "keep_this" in captured
370
+ assert "skip_this" not in captured
371
372
373
class TestDumpDictFormat:
374
"""Verify that dump files use the dict output format: {"value": ..., "meta": {...}}."""
0 commit comments