Skip to content

Commit e529128

Browse files
authored
Correctly process compile.disable in config (#22)
1 parent a7f271e commit e529128

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mmengine/_strategy/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ def compile_model(
322322
Returns:
323323
nn.Module: Compiled model.
324324
"""
325-
if isinstance(compile, bool) and not compile:
325+
if (isinstance(compile, bool) and not compile) or \
326+
(isinstance(compile, dict) and compile.get('disable', False)):
326327
return model
327328

328329
assert digit_version(TORCH_VERSION) >= digit_version('2.0.0'), (

0 commit comments

Comments
 (0)