Skip to content

Commit

Permalink
fix(exec): bool is a subtype of int
Browse files Browse the repository at this point in the history
  • Loading branch information
tbung committed Apr 25, 2023
1 parent 45d3a64 commit ec2ee92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fd_shifts/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def train(
num_epochs = 1 if cf.trainer.fast_dev_run else num_epochs
max_steps = 1 if cf.trainer.fast_dev_run else max_steps
val_every_n_epoch = 1 if cf.trainer.fast_dev_run else val_every_n_epoch
if isinstance(cf.trainer.fast_dev_run, int):
elif isinstance(cf.trainer.fast_dev_run, int):
limit_batches = cf.trainer.fast_dev_run
max_steps = cf.trainer.fast_dev_run
val_every_n_epoch = 1
Expand Down Expand Up @@ -158,7 +158,7 @@ def test(cf: configs.Config, progress: RichProgressBar = RichProgressBar()) -> N

if isinstance(cf.trainer.fast_dev_run, bool):
limit_batches = 1 if cf.trainer.fast_dev_run else 1.0
if isinstance(cf.trainer.fast_dev_run, int):
elif isinstance(cf.trainer.fast_dev_run, int):
limit_batches = cf.trainer.fast_dev_run

trainer = pl.Trainer(
Expand Down

0 comments on commit ec2ee92

Please sign in to comment.