silent some warnings in FunctionGemma Tunix notebook#312
silent some warnings in FunctionGemma Tunix notebook#312windmaple wants to merge 1 commit intogoogle-gemini:mainfrom
Conversation
Summary of ChangesHello @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 Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| "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", |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
No description provided.