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

Unpin jax, closes #214 #232

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Unpin jax, closes #214 #232

wants to merge 4 commits into from

Conversation

jobrachem
Copy link
Contributor

The issue in our code originated in the liesel.goose.optim module, specifically in the callback that updates the progress bar.

In the callback, the current loss values were accessed like this:

i = val["while_i"]
loss_train = val["history"]["loss_train"][i]
loss_validation = val["history"]["loss_validation"][i]

Some experimentation revealed that this pattern was the problem. Introducing dedicated "current_loss_train" and "current_loss_validation" carry values solved the issue:

loss_train = val["current_loss_train"]
loss_validation = val["current_loss_validation"]

While I was at it, I fixed two other issues with the progress bar:

  1. There was a bug that prevented the argument progress_bar=False from taking effect, i.e. the progress bar couldn't be turned off. This is fixed now.
  2. The progress bar displayed max_iter-1 as the total number of iterations. This is fixed now.

- The progress bar still got printing, even if progress=False got passed. This is fixed.
- The progress bar showed max_iter - 1 as the maximum number of iterations. Now it shows the correct maximum, and is updated once after initialization.
@jobrachem jobrachem self-assigned this Dec 12, 2024
@jobrachem jobrachem added the comp:goose This issue is related to the goose module label Dec 12, 2024
@jobrachem jobrachem mentioned this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:goose This issue is related to the goose module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant