Skip to content

[CI] Add ci monitor balance workflow#11962

Merged
merrymercy merged 18 commits intomainfrom
add_ci_monitor_balance_workflow
Oct 25, 2025
Merged

[CI] Add ci monitor balance workflow#11962
merrymercy merged 18 commits intomainfrom
add_ci_monitor_balance_workflow

Conversation

@BBuf
Copy link
Collaborator

@BBuf BBuf commented Oct 22, 2025

Motivation

Modifications

Accuracy Tests

Benchmarking and Profiling

Checklist

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @BBuf, 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 CI monitoring capabilities by introducing a "Test Balance Analyzer." This new tool is designed to identify and address inefficiencies in the CI pipeline by analyzing the time differences between actual test execution and their estimated durations, specifically for GPU-related tests. By providing detailed reports and actionable recommendations, it aims to prevent CI timeouts and optimize resource allocation. Alongside this, the existing CI failure analyzer has been streamlined for better focus and readability.

Highlights

  • New CI Monitor Tool: Introduced ci_analyzer_balance.py, a new script to monitor and analyze test time balance in CI.
  • Test Time Gap Analysis: The new tool identifies significant discrepancies between elapsed and estimated test times, focusing on GPU jobs within the pr-test.yml workflow.
  • CI Optimization: It helps optimize CI by tracking maximum time gaps, ranking tests by severity, and providing recommendations for adjusting estimated test durations.
  • Reporting and Integration: The tool generates detailed JSON and CSV reports and integrates with GitHub Actions to provide summaries and actionable insights.
  • ci_analyzer.py Refinement: The existing ci_analyzer.py script has been updated to remove verbose comments and explicitly define the target CI jobs for analysis, improving clarity and maintainability.
  • Documentation Update: README.md has been updated to include the new Test Balance Analyzer, its features, dependencies, and usage instructions.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/ci-monitor-balance.yml
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 introduces a new CI analysis tool, ci_analyzer_balance.py, to monitor test time balance, which is a valuable addition for maintaining CI efficiency. The new script is well-structured, but there are several opportunities for improvement, such as removing dead code and unused variables, and adhering to Python best practices like placing imports at the top of the file.

Additionally, ci_analyzer.py has been refactored. The move to a whitelist for job filtering is a good improvement for clarity. However, the removal of all docstrings from the file significantly reduces its maintainability. I've added comments with suggestions to address these points.

@merrymercy merrymercy merged commit d0cff78 into main Oct 25, 2025
23 checks passed
@merrymercy merrymercy deleted the add_ci_monitor_balance_workflow branch October 25, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments