Skip to content

Conversation

@sachinprasadhs
Copy link
Collaborator

Ran the python autogen.py make command and noticed many of the tutorials and examples having outdated examples/not synced or having extra length output for epochs.

@sachinprasadhs sachinprasadhs changed the title run autogen make Sync .md files Oct 24, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @sachinprasadhs, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a comprehensive update and expansion of the examples and tutorials, primarily driven by running the autogen.py make command. The changes aim to enhance clarity, ensure API compatibility with Keras 3, and introduce advanced features like distributed embeddings on TPUs. Several existing tutorials have been streamlined by removing verbose output and correcting minor issues, while new examples showcase cutting-edge capabilities in recommendation systems.

Highlights

  • Tutorial Output Cleanup: Removed excessive and outdated output logs from several tutorials (basic_ranking.md, basic_retrieval.md, listwise_ranking.md, sas_rec.md, scann.md, sequential_retrieval.md), making them more concise and readable.
  • Keras API Alignment: Updated API calls from tf.keras.Sequential and tf.keras.optimizers.Adagrad to keras.Sequential and keras.optimizers.Adagrad respectively across multiple examples, ensuring compatibility with Keras 3.
  • New Distributed Embedding Tutorials: Introduced two new tutorials (distributed_embedding_jax.md and distributed_embedding_tf.md) demonstrating the use of keras_rs.layers.DistributedEmbedding with TPU SparseCore for movie ranking, using both JAX and TensorFlow backends.
  • DCN Model Refactoring and Updates: The DCN tutorial (dcn.md) was significantly updated, including refactoring the model definition into a class, adjusting hyperparameters (embedding_dim, projection_dim, learning_rate, num_epochs, batch_size), adding a final dense layer, and updating performance metrics.
  • Data Leakage Prevention: Modified the listwise_ranking.md and sequential_retrieval.md tutorials to correctly split train and test data per user, preventing data leakage and ensuring more robust evaluation.
  • Wav2Vec2 Audio Classification Tutorial Removal: The wav2vec2_audiocls.md tutorial was removed from the examples.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request provides a comprehensive update to the documentation and example files. The changes include removing verbose output from notebooks, fixing typos, adding necessary installation commands, and performing minor but important code refactoring and bug fixes. A new set of tutorials for DistributedEmbedding on JAX and TensorFlow has also been added. Overall, these changes significantly improve the clarity, correctness, and usability of the examples. I've found one minor issue with a leftover terminal artifact in one of the markdown files.

@hertschuh
Copy link
Contributor

What about the ipynb files? Were they all up to date?

@sachinprasadhs
Copy link
Collaborator Author

Noticed that these .md files are actually present in https://github.com/keras-team/keras-io/tree/master/examples/keras_rs, why do we have these again in templates directory?

@sachinprasadhs
Copy link
Collaborator Author

This is the PR which caused this #2083
Was it intentional or accidental?

@hertschuh
Copy link
Contributor

This was an accident, the files in the templates folder should come from autogen and should not be committed in the repo (with some exceptions like index.md). Can you delete them all?

@sachinprasadhs
Copy link
Collaborator Author

Got it, deleted the files under temples/ except index.md files, also updated the .gitignore file.

@sachinprasadhs sachinprasadhs changed the title Sync .md files Cleanup templates/ dir Oct 27, 2025
Copy link
Contributor

@hertschuh hertschuh left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup! This was confusing.

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.

2 participants