Skip to content

Remove TF dependency in Lookahead Optimizer on MNIST example#1568

Merged
copybara-service[bot] merged 1 commit intogoogle-deepmind:mainfrom
rajasekharporeddy:lookahead_mnist
Jan 27, 2026
Merged

Remove TF dependency in Lookahead Optimizer on MNIST example#1568
copybara-service[bot] merged 1 commit intogoogle-deepmind:mainfrom
rajasekharporeddy:lookahead_mnist

Conversation

@rajasekharporeddy
Copy link
Copy Markdown
Collaborator

This PR removes TensorFlow as a dependency in lookahead_mnist.ipynb, and uses only TFDS, with grain for loading and preparing the dataset.

Copy link
Copy Markdown
Collaborator

@vroulet vroulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great thanks

@rajasekharporeddy
Copy link
Copy Markdown
Collaborator Author

rajasekharporeddy commented Jan 27, 2026

Hi @vroulet, I forgot to remove the .as_numpy_iterator() while enumerating over the batched data loader in the previous commit. Please review the changes once more.

@rdyro
Copy link
Copy Markdown
Collaborator

rdyro commented Jan 27, 2026

I think you're running into some doctests issues, can you take a look at them?

You should be able to test locally by doing

$ cd optax
$ uv pip install ".[docs]"
$ cd docs
$ make test

@rdyro
Copy link
Copy Markdown
Collaborator

rdyro commented Jan 27, 2026

Testing this locally, you just need to rebase to HEAD and it should start passing the tests.

@copybara-service copybara-service Bot merged commit b21a786 into google-deepmind:main Jan 27, 2026
15 of 16 checks passed
@rajasekharporeddy rajasekharporeddy deleted the lookahead_mnist branch January 28, 2026 03:59
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

Successfully merging this pull request may close these issues.

3 participants