updated test

This commit is contained in:
William Falcon 2020-03-06 07:05:33 -05:00
parent f6f11d31d3
commit b183782e83
1 changed files with 2 additions and 1 deletions

View File

@ -666,8 +666,9 @@ class TrainerTrainLoopMixin(ABC):
if self.has_arg('training_step', 'optimizer_idx'):
args.append(opt_idx)
else:
num_opts = len(self.optimizers)
raise ValueError(
f'Your LightningModule defines {len(self.optimizers)} optimizers but '
f'Your LightningModule defines {num_opts} optimizers but '
f'training_step is missing the "optimizer_idx" argument.'
)