-
Notifications
You must be signed in to change notification settings - Fork 564
feat: add cell to print versions of all relevant dependencies #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add cell to print versions of all relevant dependencies #127
Conversation
Summary of ChangesHello @AlapinEnjoyer, 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 significantly enhances the reproducibility and transparency of the notebook by introducing a mechanism to report the versions of all installed Python dependencies. This allows users to quickly ascertain the exact software environment, making it easier to debug compatibility issues and ensure consistent execution across different setups. Highlights
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.
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 adds a useful feature to the notebook by including a cell that prints the versions of all relevant dependencies. This is a great step towards improving the reproducibility and transparency of the environment.
My main feedback is to ensure the version checking is complete and correct. I've left a comment with a suggestion to update the list of packages to include all dependencies installed in the notebook and to use the correct distribution names (which sometimes use hyphens) for importlib.metadata to find them.
Otherwise, the changes are good and the goal of the PR is well-achieved.
| "packages = [\n", | ||
| " \"unsloth\", \"torch\", \"bitsandbytes\", \"accelerate\", \"xformers\",\n", | ||
| " \"peft\", \"trl\", \"triton\", \"cut_cross_entropy\", \"unsloth_zoo\",\n", | ||
| " \"sentencepiece\", \"protobuf\", \"datasets\", \"huggingface_hub\",\n", | ||
| " \"hf_transfer\", \"transformers\"\n", | ||
| "]\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great addition for reproducibility! However, for the version checking to work correctly for all packages, a few adjustments are needed in the packages list:
-
Use distribution names:
importlib.metadata.version()expects package distribution names, which often use hyphens instead of underscores. The following packages need to be renamed:cut_cross_entropyshould becut-cross-entropyunsloth_zooshould beunsloth-zoohuggingface_hubshould behuggingface-hubhf_transfershould behf-transfer
-
Include all dependencies: The list is missing
mamba_ssmandcausal_conv1d, which are installed in the notebook. Their distribution names aremamba-ssmandcausal-conv1d.
Here is the corrected list of packages:
packages = [
"unsloth", "torch", "bitsandbytes", "accelerate", "xformers",
"peft", "trl", "triton", "cut-cross-entropy", "unsloth-zoo",
"sentencepiece", "protobuf", "datasets", "huggingface-hub",
"hf-transfer", "transformers", "mamba-ssm", "causal-conv1d",
]|
@AlapinEnjoyer Re peft - I added a fix so it should work now ie |
This change adds a cell that prints the versions of all relevant dependencies used in the notebook.
The goal is to make the environment more transparent and reproducible without needing to launch a colab instance each time to inspect which versions are preinstalled.
I added this because the recent peft update (0.18.0) is currently incompatible with unsloth which made the notebook non-reproducible. By explicitly showing the installed versions, it becomes easier to detect such discrepancies and ensure that dependency versions remain stable over time.
We could consider adding this version reporting cell to all notebooks, or alternatively pin the critical dependencies directly?