question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

max_iters as optional arg in Engine run

See original GitHub issue

🚀 Feature

Idea is to cover the following usage:

trainer.run(data, max_iters=1234)
# here we still have epoch length as len(data) if defined

which can be roughly done as

max_iters = 1234
trainer.run(data, epoch_length=max_iters)
# here we run 1 epoch of size max_iters

or 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
thescriptedcommented, Oct 8, 2020

Got it, yeah I’d be happy to put in the time and motivation to work through this, and I’ll be quick to notify and un-assign myself if I feel incapable.

1reaction
vfdev-5commented, Oct 6, 2020

@sdesrozis according to your time schedule, let’s make this issue as Hacktorberfest and if it is not yet solved, you can try to give a shot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Python Optional Arguments When Defining Functions
In this tutorial, you'll learn about Python optional arguments and how to define functions with default values. You'll also learn how to create...
Read more >
python - How do I define a function with optional arguments?
Just use the *args parameter, which allows you to pass as many arguments as you want after your a,b,c . You would have...
Read more >
Optional Parameters Are More Powerful Than You Think
Optional Parameters Are More Powerful Than You Think | Godot Engine Tricks. 3.8K views · 11 months ago ...more ...
Read more >
Pass additional arguments to yarn #188 - GitHub
So, I need to run yarn install with "--ignore-optional" argument. Generic solution for this issue would be to be able to configure yarn...
Read more >
statsmodels.base.model.LikelihoodModel.fit
The 'basinhopping' solver ignores maxiter , retall , full_output explicit arguments. Optional arguments for solvers (see returned Results.mle_settings):. ' ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found