Skip to content

fix python library dependencies#299

Merged
bebechien merged 2 commits intogoogle-gemini:mainfrom
bebechien:main
Feb 4, 2026
Merged

fix python library dependencies#299
bebechien merged 2 commits intogoogle-gemini:mainfrom
bebechien:main

Conversation

@bebechien
Copy link
Collaborator

No description provided.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@gemini-code-assist
Copy link
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 setup instructions and dependency installations across several Jupyter notebooks. The changes ensure that all necessary Python libraries, such as kagglehub and transformers, are correctly installed and that user authentication steps, like logging into Hugging Face, are clearly presented. This improves the reliability and user experience of running these notebooks.

Highlights

  • Dependency Management: Ensured that the kagglehub library is explicitly installed in notebooks where it is required, specifically in docs/core/gemma_library.ipynb and docs/paligemma/fine-tuning-paligemma.ipynb.
  • Transformers Library Installation: Standardized the installation of the transformers library in docs/core/huggingface_text_finetune_qlora.ipynb to use the standard pip install transformers command, moving away from a specific Git branch installation.
  • Hugging Face Login Instructions: Improved the clarity and placement of Hugging Face login instructions in docs/capabilities/vision/video-understanding.ipynb by reordering the code cell and adding a preceding markdown explanation.
Changelog
  • docs/capabilities/vision/video-understanding.ipynb
    • Moved the Hugging Face login() code cell to appear after the pip install commands.
    • Added a preceding markdown cell to explicitly instruct users to log in to Hugging Face Hub.
  • docs/core/gemma_library.ipynb
    • Added kagglehub to the pip install command for the gemma library.
  • docs/core/huggingface_text_finetune_qlora.ipynb
    • Updated the transformers installation command to use the standard pip install transformers instead of a specific Git branch.
  • docs/paligemma/fine-tuning-paligemma.ipynb
    • Added an explicit installation step for kagglehub with a preceding markdown explanation.
Activity
  • No human activity recorded yet.
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 addresses dependency issues across several notebooks, primarily by adding missing packages like kagglehub and updating the transformers installation method. The changes are logical and improve the setup process for these examples. I've added a couple of suggestions to enhance consistency and reproducibility by using upgrade flags and pinning a key dependency version.

"outputs": [],
"source": [
"!pip install -q gemma"
"!pip install -q gemma kagglehub"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency with other notebooks in the repository (e.g., fine-tuning-paligemma.ipynb) and to ensure the latest compatible versions of packages are installed, it's good practice to use the -U (or --upgrade) flag.

Suggested change
"!pip install -q gemma kagglehub"
"!pip install -U -q gemma kagglehub"

"# Install Gemma release branch from Hugging Face\n",
"%pip install git+https://github.com/huggingface/transformers@v4.49.0-Gemma-3\n",
"# Install Transformers\n",
"%pip install transformers\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To ensure reproducibility and prevent potential breakages from future transformers releases, it's advisable to specify a minimum compatible version. Other notebooks in this repository use "transformers>=4.53.0", which would be a good addition here for consistency.

Suggested change
"%pip install transformers\n",
"%pip install \"transformers>=4.53.0\"\n"

@bebechien bebechien merged commit 62c2332 into google-gemini:main Feb 4, 2026
3 checks passed
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.

1 participant