@@ -127,9 +127,7 @@ def test_nesting_depth(self):
127127 """Module nesting creates expected hierarchy."""
128128 model = RandomGraphModel (target_nodes = 500 , nesting_depth = 4 , seed = 42 )
129129 ml = log_forward_pass (model , torch .randn (2 , 64 ))
130- max_depth = max (
131- len (ml [label ].containing_modules_origin_nested ) for label in ml .layer_labels
132- )
130+ max_depth = max (len (ml [label ].containing_modules ) for label in ml .layer_labels )
133131 assert max_depth >= 3
134132 ml .cleanup ()
135133
@@ -325,7 +323,7 @@ def test_dot_renders_small_graph(self):
325323 model ,
326324 torch .randn (2 , 64 ),
327325 vis_node_placement = "dot" ,
328- save_only = True ,
326+ vis_save_only = True ,
329327 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "dot_200" ),
330328 )
331329
@@ -337,7 +335,7 @@ def test_sfdp_renders_large_graph(self):
337335 model ,
338336 torch .randn (2 , 64 ),
339337 vis_node_placement = "sfdp" ,
340- save_only = True ,
338+ vis_save_only = True ,
341339 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "sfdp_3k" ),
342340 )
343341
@@ -350,7 +348,7 @@ def test_elk_renders_3k(self):
350348 model ,
351349 torch .randn (2 , 64 ),
352350 vis_node_placement = "elk" ,
353- save_only = True ,
351+ vis_save_only = True ,
354352 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "elk_3k" ),
355353 )
356354
@@ -363,7 +361,7 @@ def test_elk_renders_5k(self):
363361 model ,
364362 torch .randn (2 , 64 ),
365363 vis_node_placement = "elk" ,
366- save_only = True ,
364+ vis_save_only = True ,
367365 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "elk_5k" ),
368366 )
369367
@@ -376,7 +374,7 @@ def test_elk_renders_10k(self):
376374 model ,
377375 torch .randn (2 , 64 ),
378376 vis_node_placement = "elk" ,
379- save_only = True ,
377+ vis_save_only = True ,
380378 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "elk_10k" ),
381379 )
382380
@@ -389,7 +387,7 @@ def test_elk_renders_20k(self):
389387 model ,
390388 torch .randn (2 , 64 ),
391389 vis_node_placement = "elk" ,
392- save_only = True ,
390+ vis_save_only = True ,
393391 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "elk_20k" ),
394392 )
395393
@@ -402,7 +400,7 @@ def test_elk_renders_50k(self):
402400 model ,
403401 torch .randn (2 , 64 ),
404402 vis_node_placement = "elk" ,
405- save_only = True ,
403+ vis_save_only = True ,
406404 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "elk_50k" ),
407405 )
408406
@@ -416,7 +414,7 @@ def test_elk_renders_100k(self):
416414 model ,
417415 torch .randn (2 , 64 ),
418416 vis_node_placement = "elk" ,
419- save_only = True ,
417+ vis_save_only = True ,
420418 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "elk_100k" ),
421419 )
422420
@@ -430,7 +428,7 @@ def test_elk_renders_250k(self):
430428 torch .randn (2 , 64 ),
431429 vis_node_placement = "elk" ,
432430 vis_fileformat = "svg" ,
433- save_only = True ,
431+ vis_save_only = True ,
434432 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "elk_250k" ),
435433 )
436434
@@ -444,7 +442,7 @@ def test_elk_renders_1M(self):
444442 torch .randn (2 , 64 ),
445443 vis_node_placement = "elk" ,
446444 vis_fileformat = "svg" ,
447- save_only = True ,
445+ vis_save_only = True ,
448446 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "elk_1M" ),
449447 )
450448
@@ -453,8 +451,8 @@ def test_vis_node_placement_forwarded(self):
453451 model = RandomGraphModel (target_nodes = 200 , seed = 42 )
454452 ml = log_forward_pass (model , torch .randn (2 , 64 ))
455453 ml .render_graph (
456- vis_opt = "unrolled" ,
457- save_only = True ,
454+ vis_mode = "unrolled" ,
455+ vis_save_only = True ,
458456 vis_outpath = os .path .join (VIS_OUTPUT_DIR , "placement_test" ),
459457 vis_node_placement = "dot" ,
460458 )
@@ -485,17 +483,17 @@ def _render_both(self, model, x, name):
485483 show_model_graph (
486484 model ,
487485 x ,
488- save_only = True ,
489- vis_opt = "unrolled" ,
486+ vis_save_only = True ,
487+ vis_mode = "unrolled" ,
490488 vis_node_placement = "dot" ,
491489 vis_outpath = os .path .join (self .COMPARE_DIR , f"{ name } _dot" ),
492490 )
493491 # ELK
494492 show_model_graph (
495493 model ,
496494 x ,
497- save_only = True ,
498- vis_opt = "unrolled" ,
495+ vis_save_only = True ,
496+ vis_mode = "unrolled" ,
499497 vis_node_placement = "elk" ,
500498 vis_outpath = os .path .join (self .COMPARE_DIR , f"{ name } _elk" ),
501499 )
@@ -553,8 +551,8 @@ def test_benchmark_dot_scaling(self):
553551 start = time .time ()
554552 try :
555553 ml .render_graph (
556- vis_opt = "unrolled" ,
557- save_only = True ,
554+ vis_mode = "unrolled" ,
555+ vis_save_only = True ,
558556 vis_outpath = os .path .join (VIS_OUTPUT_DIR , f"bench_{ target } " ),
559557 vis_node_placement = "dot" ,
560558 )
0 commit comments