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

Error in EarlyStopping function when providing a validation dataset #52

Open
kdzhang opened this issue May 10, 2024 · 0 comments
Open

Comments

@kdzhang
Copy link

kdzhang commented May 10, 2024

I encountered the error below when a validation dataset is provided:

RunTimeError: Early stopping conditioned on metric `val_ll` which is not available. Pass in or modify your `EarlyStopping` callback to use any of the following: `train_loss`, `val_log_likelihood`

I changed the following line in run_helper_lightening.py :

# current
callbacks = [EarlyStopping(monitor="val_ll", mode="max", patience=10, min_delta=0.001)] if val_dataloader is not None else []

# modified
callbacks = [EarlyStopping(monitor="val_log_likelihood", mode="max", patience=10, min_delta=0.001)] if val_dataloader is not None else []

After this change the code runs. I am not very familiar with PyTorch, so I am not sure whether this is a bug or I am making some newbie error here... Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant