-
-
Notifications
You must be signed in to change notification settings - Fork 692
max_iters as optional arg in Engine run #1300
Copy link
Copy link
Closed
Labels
Description
🚀 Feature
Idea is to cover the following usage:
trainer.run(data, max_iters=1234)
# here we still have epoch length as len(data) if definedwhich can be roughly done as
max_iters = 1234
trainer.run(data, epoch_length=max_iters)
# here we run 1 epoch of size max_itersor as something like
max_iters = 1234
epoch_length = ...
max_epochs = max_iters // epoch_length + 1
@trainer.on(Events.ITERATION_COMPLETED(once=max_iters))
def stop():
trainer.terminate()
trainer.run(data, max_epochs=max_epochs)Argument max_iters is mutually exclusive with max_epochs.
Reactions are currently unavailable