Skip to content

use mig_strategy and numeric mig_instance_id for OCP MIG GPU rows#613

Merged
djnakabaale merged 4 commits intomainfrom
update_mig_fields
Mar 17, 2026
Merged

use mig_strategy and numeric mig_instance_id for OCP MIG GPU rows#613
djnakabaale merged 4 commits intomainfrom
update_mig_fields

Conversation

@djnakabaale
Copy link
Copy Markdown
Contributor

uv run nise report ocp --ocp-cluster-id test-mig-cluster --static-report-file tests/ocp_gpu_static_report.yml -w

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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 refines the data model for Multi-Instance GPU (MIG) reporting within OpenShift, specifically by introducing a more descriptive mig_strategy field and standardizing mig_instance_id as a numeric value. These changes aim to improve the accuracy and clarity of GPU usage data, ensuring that reports reflect the nuances of MIG configurations more effectively.

Highlights

  • MIG GPU Data Model Update: Replaced the mig_slice_count field with mig_strategy to better represent Multi-Instance GPU (MIG) configurations in OpenShift (OCP) GPU usage reports.
  • Numeric MIG Instance IDs: Changed mig_instance_id to be a numeric value, defaulting to a 1-based index per GPU slice when not explicitly provided, enhancing data consistency and usability.
  • Version Bump: Incremented the project version from 5.3.8 to 5.3.9.

🧠 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.

Changelog
  • nise/init.py
    • Updated the project version to 5.3.9.
  • nise/generators/ocp/ocp_generator.py
    • Replaced the mig_slice_count column and usage with mig_strategy.
    • Modified mig_instance_id to be an integer, defaulting to a 1-based index.
    • Adjusted gpu_uuid to use the UUID string, separating it from the numeric mig_instance_id.
  • tests/ocp_gpu_static_report.yml
    • Updated MIG instance configurations to use mig_strategy instead of mig_slice_count.
    • Added a new 'GH100' GPU entry with a 'single' MIG strategy for testing.
  • tests/test_ocp_generator.py
    • Updated test cases to assert on mig_strategy instead of mig_slice_count.
    • Modified test assertions for mig_instance_id to expect an integer value.
    • Adjusted test data generation to align with the new mig_strategy and numeric mig_instance_id.
Activity
  • No human activity has been recorded on this pull request yet.
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
Copy Markdown

@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 updates the OCP MIG GPU data generation to use mig_strategy instead of mig_slice_count, and introduces a numeric mig_instance_id while retaining a UUID for gpu_uuid. The changes are consistently applied throughout the data generator, test files, and static report configuration. The implementation is solid, but I have one suggestion to enhance the robustness of parsing the new numeric mig_instance_id to provide better error handling for invalid inputs.

Comment thread nise/generators/ocp/ocp_generator.py Outdated
myersCody
myersCody previously approved these changes Mar 17, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.6%. Comparing base (98fb2ed) to head (bc3ab79).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #613   +/-   ##
=====================================
  Coverage   93.6%   93.6%           
=====================================
  Files         56      56           
  Lines       4782    4787    +5     
  Branches     669     669           
=====================================
+ Hits        4476    4483    +7     
+ Misses       165     164    -1     
+ Partials     141     140    -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

myersCody
myersCody previously approved these changes Mar 17, 2026
@djnakabaale djnakabaale merged commit 2f4e57d into main Mar 17, 2026
5 checks passed
@djnakabaale djnakabaale deleted the update_mig_fields branch March 17, 2026 17:51
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