Skip to content

Conversation

@jiapingW
Copy link
Collaborator

Motivation

Fix issue. #432

Modifications

Related Issues

Accuracy Test

Benchmark & Profiling

Checklist

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jiapingW, 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 addresses a reported bug by updating and consolidating the project's dependency management. It ensures that the tensorboard package is correctly listed in the ROCm-specific requirements and initializes the primary requirements.txt with a complete set of necessary packages for the project's operation.

Highlights

  • Dependency Update: The requirements-rocm.txt file has been updated to include tensorboard, ensuring its availability for ROCm-based environments.
  • Core Requirements Initialization: The main requirements.txt file, previously empty, has been populated with a comprehensive list of essential project dependencies, including torch, transformers, wandb, and tensorboard.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 adds tensorboard as a dependency and introduces a new requirements.txt file. While adding the dependency is the goal, creating a new requirements.txt file introduces a second source of truth for dependencies, which is already managed in pyproject.toml. This can lead to inconsistencies and maintenance problems. The new tensorboard dependency is also missing from pyproject.toml, which will cause installation failures for users following the standard installation procedure. My recommendation is to remove the newly created requirements.txt and instead add tensorboard to the list of dependencies in pyproject.toml to maintain a single, consistent source for dependency management.

requirements.txt Outdated
Comment on lines 1 to 13
pre-commit
torch==2.9.1
torchaudio==2.9.1
torchvision==0.24.1
transformers==4.57.1
qwen-vl-utils==0.0.11
datasets
setuptools
tqdm
wandb
psutil
numpy
tensorboard
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This new requirements.txt file duplicates dependencies that are already managed in pyproject.toml. This creates two sources of truth for dependencies, which can easily lead to inconsistencies and maintenance issues.

For example:

  • This file is missing several dependencies listed in pyproject.toml (e.g., accelerate, pydantic, sglang).
  • It includes tensorboard, which is not present in pyproject.toml.

The standard practice for modern Python projects is to define dependencies in pyproject.toml. The installation instructions in docs/get_started/installation.md also rely on this file (uv pip install .).

To resolve this, I recommend removing this requirements.txt file and adding tensorboard to the dependencies list in pyproject.toml. This will ensure all dependencies are managed in a single, consistent location.

pydantic
sglang[all]==0.5.4
openai-harmony
tensorboard
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While adding tensorboard here is correct for the ROCm-specific environment, this dependency should also be added to the main dependency list in pyproject.toml. Currently, it's missing from pyproject.toml, which means it won't be installed in non-ROCm environments that use pip install . as per the documentation, leading to potential ModuleNotFoundError errors.

Copy link

Choose a reason for hiding this comment

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

I think we can move all requirements-*.txt files to under pyproject.toml as optional dependencies to make everything consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great! I'll handle it soon.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But now the ROCm env is not updated. Furthermore, its dependencies, such as torch, differ significantly from CUDA. They will be merged again after any AMD-related updates.

@jiapingW
Copy link
Collaborator Author

/gemini review

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 refactors the project's dependencies by moving ROCm-specific requirements from requirements-rocm.txt to an optional dependency group in pyproject.toml and adding tensorboard as a core dependency. The changes centralize dependency management, which is a good improvement. My review focuses on two points: first, ensuring that the installation instructions for ROCm users are not lost in this transition, as the required --extra-index-url is no longer specified. Second, I suggest sorting the main dependencies list to improve maintainability.

pyproject.toml Outdated
Comment on lines 44 to 51
rocm = [
"torch==2.8.0+rocm6.3",
"torchaudio==2.8.0+rocm6.3",
"torchvision==0.23.0+rocm6.3",
"sglang[all]==0.5.4",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

high

By moving the ROCm dependencies from requirements-rocm.txt to this optional dependency group, the instruction to use --extra-index-url https://download.pytorch.org/whl/rocm6.3 is lost. This is crucial for users to install the ROCm-compatible PyTorch wheels. Please add this instruction to the project's installation documentation or add a comment in this file to guide users.

For example, you could add a comment above this section:

# To install with ROCm support, run:
# pip install .[rocm] --extra-index-url https://download.pytorch.org/whl/rocm6.3
rocm = [
    # ...
]

pyproject.toml Outdated
Comment on lines 27 to 31
"tensorboard",
"torch==2.9.1",
"torchaudio==2.9.1",
"torchvision==0.24.1",
"sglang==0.5.6",
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 better maintainability and to avoid future merge conflicts, it's a good practice to keep dependency lists sorted alphabetically. Consider sorting the entire dependencies list.

@jiapingW
Copy link
Collaborator Author

/gemini review

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 aims to improve dependency management by moving ROCm-specific requirements into pyproject.toml as an optional dependency group and adding tensorboard. While centralizing dependencies is a good step, the current implementation introduces a critical dependency conflict that will break installation for ROCm users. I've provided a detailed comment on how to resolve this. Additionally, I've made a couple of suggestions to sort the dependency lists for better maintainability. Please review the comments for details.

@sgl-project sgl-project deleted a comment from gemini-code-assist bot Jan 20, 2026
@sgl-project sgl-project deleted a comment from gemini-code-assist bot Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants