File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -129,9 +129,19 @@ def reset_seeds(gallery_conf, fname):
129
129
130
130
if hasattr (torch , "_dynamo" ):
131
131
torch ._dynamo .reset ()
132
-
133
- if hasattr (torch , "_inductor" ) and hasattr (torch ._inductor , "utils" ):
134
- torch ._inductor .utils .fresh_inductor_cache ()
132
+ if hasattr (torch ._dynamo , "optimizations" ):
133
+ torch ._dynamo .optimizations .clear ()
134
+ if hasattr (torch ._dynamo , "config" ):
135
+ torch ._dynamo .config .clear_cache ()
136
+
137
+ if hasattr (torch , "_inductor" ):
138
+ if hasattr (torch ._inductor , "utils" ):
139
+ torch ._inductor .utils .fresh_inductor_cache ()
140
+ if hasattr (torch ._inductor , "metrics" ):
141
+ torch ._inductor .metrics .reset ()
142
+
143
+ if hasattr (torch , "_logging" ):
144
+ torch ._logging .set_logs ()
135
145
136
146
import __main__
137
147
You can’t perform that action at this time.
0 commit comments