Skip to content

Conversation

@CHERRY-ui8
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @CHERRY-ui8, 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 focuses on streamlining the execution environment by minimizing the logging footprint of the Ray framework within the graphgen/engine.py module. The changes are designed to make the console output cleaner and more focused, while also addressing potential data conversion issues by adjusting Ray Data's internal settings. The overall impact is a less verbose and potentially more stable Ray integration.

Highlights

  • Ray Logging Reduction: This PR significantly reduces the logging output and verbosity from the Ray framework, specifically Ray Data, by disabling progress bars, important warnings, and metrics export.
  • Ray Data Context Configuration: The ray.data.DataContext is now configured to disable rich progress bars, ray_tqdm, and tensor extension casting, which helps prevent conversion errors with complex data types.
  • Dependency Additions: The os module and DataContext from ray.data have been imported to facilitate the new configurations.
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 aims to reduce the verbosity of Ray logging by adding several configuration settings in the Engine's __init__ method. The changes correctly use environment variables and Ray's DataContext to disable progress bars and other noisy outputs. My review includes a couple of suggestions to improve the clarity and safety of these configurations: one regarding the potential redundancy in disabling progress bars, and another about the broad suppression of important warnings, which could be risky.

Comment on lines 27 to 28
# Disable metrics exporter to avoid RpcError
os.environ.setdefault("RAY_DISABLE_IMPORTANT_WARNING", "1")
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The comment on line 27, 'Disable metrics exporter to avoid RpcError', is misleading for the action on line 28. Line 28 sets RAY_DISABLE_IMPORTANT_WARNING, which globally suppresses a range of Ray warnings, a potentially risky action as it might hide other important issues. The metrics exporter is actually disabled on line 38 via _metrics_export_port=0.

Given that you are directly disabling the metrics exporter, is it still necessary to suppress all important warnings? If this is intended to silence a specific warning that persists even after disabling the exporter, please update the comment to be more specific. Otherwise, for better safety, it would be best to remove line 28.

Comment on lines 26 to 31
os.environ.setdefault("RAY_DATA_DISABLE_PROGRESS_BARS", "1")
# Disable metrics exporter to avoid RpcError
os.environ.setdefault("RAY_DISABLE_IMPORTANT_WARNING", "1")
ctx = DataContext.get_current()
ctx.enable_rich_progress_bars = False
ctx.use_ray_tqdm = False
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

There appears to be some redundancy in disabling the Ray Data progress bars. You are setting the RAY_DATA_DISABLE_PROGRESS_BARS environment variable and also programmatically disabling progress bars via DataContext (enable_rich_progress_bars and use_ray_tqdm).

It's generally cleaner to use the programmatic API when possible, as it's more explicit. Consider removing the environment variable modification on line 26 and relying solely on the DataContext settings on lines 30-31 for disabling progress bars. This would make the configuration more consolidated and easier to understand.

@ChenZiHong-Gavin ChenZiHong-Gavin merged commit c9b065c into InternScience:main Dec 19, 2025
3 checks passed
@ChenZiHong-Gavin ChenZiHong-Gavin deleted the feat/reduce-ray-logging branch December 19, 2025 08:37
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.

2 participants