Skip to content

Comments

silent some warnings in FunctionGemma Tunix notebook#312

Closed
windmaple wants to merge 1 commit intogoogle-gemini:mainfrom
windmaple:FG-tunix
Closed

silent some warnings in FunctionGemma Tunix notebook#312
windmaple wants to merge 1 commit intogoogle-gemini:mainfrom
windmaple:FG-tunix

Conversation

@windmaple
Copy link
Collaborator

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @windmaple, 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 introduces a new Jupyter notebook that demonstrates the process of LoRA-finetuning the FunctionGemma 270M model for mobile action tasks using the Google Tunix library. The notebook includes steps for dependency installation, data preparation, model finetuning, and evaluation, showcasing how to improve model accuracy. Additionally, it incorporates a change to silence specific warnings from the wandb library to enhance the user experience during execution.

Highlights

  • New Notebook Introduction: A new Jupyter notebook has been added, demonstrating the LoRA-finetuning of the FunctionGemma 270M model for mobile actions using the Google Tunix library.
  • Warning Suppression: Implemented a mechanism within the notebook to suppress unnecessary warnings from the wandb library, leading to a cleaner execution output.
  • Model Finetuning Workflow: The notebook outlines a complete workflow including dependency installation, data preparation, model and sampler setup, pre-finetuning evaluation, the finetuning process, post-finetuning evaluation, and model export to safetensors.
Changelog
  • Silent some unnecessary warnings in FunctionGemma+Tunix notebook
    • Added a new Jupyter notebook demonstrating LoRA-finetuning of FunctionGemma 270M for mobile actions using Tunix.
    • Included steps for environment setup, data loading, model preparation, training, and evaluation.
    • Integrated wandb warning suppression for cleaner output.
Activity
  • No specific activity has been recorded for this pull request since its creation.
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.

@windmaple windmaple closed this Feb 12, 2026
@windmaple windmaple deleted the FG-tunix branch February 12, 2026 09:30
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 introduces a new Jupyter notebook for finetuning FunctionGemma with Tunix. The main changes involve silencing some warnings from wandb and making the notebook more robust for re-execution by disabling wandb for sample runs. I have a couple of suggestions for improvement. First, there's an unused parameter in a helper function which should be removed to improve code clarity. Second, a comment contains a future date which is likely a typo and could be confusing. Additionally, the filename Silent some unnecessary warnings in FunctionGemma+Tunix notebook is not ideal as it contains spaces and lacks the .ipynb extension. It would be better to follow a more standard naming convention.

Comment on lines +361 to +366
"def get_model_config(config_path):\n",
" config = gemma_lib.ModelConfig.gemma3_270m()\n",
" return config\n",
"\n",
"config_path = os.path.join(local_model_path, \"config.json\")\n",
"model_config = get_model_config(config_path)\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

The get_model_config function defines a config_path parameter that is not used. The function always returns a hardcoded configuration, making the parameter and the config_path variable unnecessary and potentially confusing. To improve clarity, the unused parameter and variable should be removed.

def get_model_config():
    return gemma_lib.ModelConfig.gemma3_270m()

model_config = get_model_config()

}
],
"source": [
"# This features requires installing main branch as of 1/2026.\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

The date 1/2026 in this comment is in the future. This is likely a typo and could be confusing for anyone running this notebook. It's better to either correct the date or make the comment less specific if the exact version/date is not critical.

# This feature requires installing a recent version from the main branch.

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