Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add parameter --max-epoch #165

Merged
merged 8 commits into from
Nov 29, 2023
Merged

add parameter --max-epoch #165

merged 8 commits into from
Nov 29, 2023

Conversation

lfoppiano
Copy link
Collaborator

This PR adds the parameter --max-epoch which override the default value and disable Early stop.

I've implemented only for sequence labelling

@lfoppiano lfoppiano added the enhancement New feature or request label Aug 24, 2023
@kermitt2
Copy link
Owner

Hi Luca !

It seems in this PR that you consider that if max-epoch is defined, then the training must run without early stop?

However, it's not the case normally, we want to train with early stop until we reach a max epoch. I usually use it as max epoch threshold in early stop training too (to avoid training for too long). The training method for the different models implementation actually use early stop with max-epoch combined.

@lfoppiano
Copy link
Collaborator Author

Yes, I though that currently, the default values with earlyStop=True are good enough because it's going to stop anyway after 20-30 iterations.
On the other hand, setting max_epoch, might indicate a clear intention on disabling the earlyStop.
I can change it that it won't set earlyStop=False but then I will have to add an additional parameter to disable the earlyStop.
What do you think?

@kermitt2
Copy link
Owner

the default values with earlyStop=True are good enough because it's going to stop anyway after 20-30 iterations.

Well not necessarily, especially if patience is set higher.

On the other hand, setting max_epoch, might indicate a clear intention on disabling the earlyStop.

Personally I rely on max-epoch with early stop to avoid training too long.

I can change it that it won't set earlyStop=False but then I will have to add an additional parameter to disable the earlyStop.

Personally I am not a fan of all these command line parameters (I prefer a config file or simply a dict somewhere, more readable), but yes that would be consistent with the training implementation.

@lfoppiano
Copy link
Collaborator Author

lfoppiano commented Aug 25, 2023

OK, then I will decouple early stop and max_epoch.
To avoid misunderstanding I will add explicit settings, but here a dilemma, which one you prefer?:

  1. --early-stop true / --early-stop false
  2. --early-stop / --no-early-stop

I agree that the number of parameters are getting a bit hard to follow.

@lfoppiano
Copy link
Collaborator Author

So far I've implemented number 1, because it seems less confusing, I can change it if requested

@kermitt2 kermitt2 merged commit 236c2e3 into master Nov 29, 2023
1 check passed
@lfoppiano lfoppiano deleted the max-epoch-param branch December 17, 2023 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants