Skip to content

Commit ab8b801

Browse files
Internal change
PiperOrigin-RevId: 423362449
1 parent de44470 commit ab8b801

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

official/core/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def get_train_actions(
201201
"""Gets train actions for TFM trainer."""
202202
train_actions = []
203203
# Adds pruning callback actions.
204-
if hasattr(params.task, 'pruning'):
204+
if hasattr(params.task, 'pruning') and params.task.pruning:
205205
train_actions.append(
206206
PruningAction(
207207
export_dir=model_dir,

0 commit comments

Comments
 (0)