Skip to content

Update notebook - #293

Merged
bebechien merged 6 commits into
google-gemma:mainfrom
bebechien:update-notebook
Jan 21, 2026
Merged

Update notebook#293
bebechien merged 6 commits into
google-gemma:mainfrom
bebechien:update-notebook

Conversation

@bebechien

Copy link
Copy Markdown
Collaborator

fix notebook to use login() for HF and Kaggle

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @bebechien, 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 refines the user experience across several Jupyter notebooks by standardizing the authentication methods for external platforms like Hugging Face and Kaggle. The changes primarily involve migrating from explicit credential handling to using dedicated login() functions provided by the respective libraries, which simplifies the setup process for users. Additionally, minor structural and metadata adjustments were made to the notebooks for better consistency.

Highlights

  • Simplified Authentication: Updated multiple notebooks to use the login() function for both Hugging Face and Kaggle, replacing manual environment variable setup or google.colab.userdata calls for a more streamlined authentication experience.
  • Notebook Metadata Cleanup: Removed redundant id fields from cell metadata in huggingface_text_finetune_qlora.ipynb and added "provenance": [] to the colab metadata in several notebooks, improving consistency and potentially reducing noise.
  • Improved User Guidance: Adjusted instructional text in notebooks to reflect the new login() method for accessing models and setting up Kaggle credentials, making the documentation clearer for users.
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.

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

Copy link
Copy Markdown
Contributor

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 updates several Jupyter notebooks to improve the authentication process for Hugging Face and Kaggle. The changes replace explicit retrieval of API tokens from google.colab.userdata with direct calls to huggingface_hub.login() and kagglehub.login(). This streamlines the login experience, making the notebooks more user-friendly and robust by utilizing the libraries' native authentication flows. Additionally, minor metadata updates and text formatting adjustments were made across the notebooks, contributing to overall code cleanliness and consistency.

@markmcd markmcd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FWIW, if .login() etc has any interactivity, then they still won't work with the automated importer, which still still try to run them, but this seems like a net improvement anyway.

@bebechien
bebechien merged commit aedb8df into google-gemma:main Jan 21, 2026
3 checks passed
@bebechien
bebechien deleted the update-notebook branch April 15, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants