File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ def maybe_unbox(x):
496496
497497 if unknown_state_flat :
498498 paths_str = ""
499- for path , value_state in unknown_state_flat .items ():
499+ for path , _ in unknown_state_flat .items ():
500500 paths_str += f"\n - { '/' .join (map (str , path ))} "
501501
502502 # Dynamically reconstruct the unknown variables
@@ -505,10 +505,8 @@ def maybe_unbox(x):
505505 if not hasattr (curr , p ):
506506 setattr (curr , p , nnx .Module ())
507507 curr = getattr (curr , p )
508- if not hasattr (curr , path [- 1 ]):
509- setattr (curr , path [- 1 ], value_state .type (value_state .value ))
510508
511- warnings .warn (f"Found unknown module paths in incoming state:{ paths_str } . They have been dynamically reconstructed." )
509+ warnings .warn (f"Found unknown module paths in incoming state:{ paths_str } . Intermediate modules have been reconstructed." )
512510
513511 nnx .update (module , new_state )
514512 _refresh_variable_trace_state (module )
You can’t perform that action at this time.
0 commit comments