Skip to content

[data, torch_profile] test: add st of torch and mstx#23

Merged
tardis-key merged 16 commits into
verl-project:mainfrom
756017542:main
Mar 25, 2026
Merged

[data, torch_profile] test: add st of torch and mstx#23
tardis-key merged 16 commits into
verl-project:mainfrom
756017542:main

Conversation

@756017542
Copy link
Copy Markdown
Contributor

@756017542 756017542 commented Mar 18, 2026

What does this PR do?

add st of torch and mstx

Add concise overview of what this PR aims to achieve or accomplish. Reference related GitHub issues and PRs that help with the review.

Checklist Before Starting

  • Search for similar PRs. Paste at least one query link here: ...
  • Format the PR title as [{modules}] {type}: {description} (This will be checked by the CI)
    • {modules} include mstx, mvtx, torch_profile, deployment, perf, algo, env, doc, data, cfg, ci, misc,
    • If this PR involves multiple modules, separate them with , like [mstx, ci]
    • {type} is in feat, fix, refactor, chore, test
    • If this PR breaks any API (CLI arguments, config, function signature, etc.), add [BREAKING] to the beginning of the title.
    • Example: [BREAKING][mstx, torch_profile] feat: support timeline parsing

Test

For changes that can not be tested by CI (e.g., algorithm implementation, new model support), validate by experiment(s) and show results like training curve plots, evaluation results, etc.

API and Usage Example

Demonstrate how the API changes if any, and provide usage example(s) if possible.

# Add code snippet or script demonstrating how to use this

Design & Code Changes

Demonstrate the high-level design if this PR is complex, and list the specific changes.

Checklist Before Submitting

Important

Please check all the following items before requesting a review, otherwise the reviewer might deprioritize this PR for review.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

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 significantly enhances the testing infrastructure by introducing end-to-end tests for MSTX and PyTorch profilers. It provides concrete examples of profiler outputs and a utility for data compression, ensuring the robustness and maintainability of the profiling analysis tools.

Highlights

  • New End-to-End Tests: Added dedicated end-to-end tests for both MSTX and PyTorch profilers to validate their output generation and functionality.
  • Sample Profiling Data: Included new sample profiling data files for both MSTX and PyTorch, which are used by the newly added E2E tests.
  • JSON to JSON.GZ Conversion Utility: Introduced a Python script to convert standard JSON files into a gzipped JSON format, potentially for storage or transfer efficiency.
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.

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
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 support for torch and mstx profilers, including new test data and end-to-end tests. My review focuses on improving the quality and robustness of the new tests and utility scripts. I've suggested using pytest fixtures to make the tests cleaner and more reliable. For the new data conversion script, I've recommended changes to make it more reusable and to improve its error handling. I also pointed out some inconsistencies in the test data and a best practice of not committing generated files to the repository.

Comment thread tests/special_e2e/test_mstx_e2e.py Outdated
Comment thread tests/special_e2e/test_torch_e2e.py Outdated
Comment thread torch_data/jsontojsongz.py Outdated
Comment thread torch_data/jsontojsongz.py Outdated
Comment thread torch_data/rl_timeline.html Outdated
@756017542 756017542 changed the title add st of torch and mstx add st of torch Mar 18, 2026
Comment thread torch_data/jsontojsongz.py Outdated
@756017542 756017542 changed the title add st of torch [data, torch_profile] test: add st of torch Mar 19, 2026
Comment thread tests/special_e2e/test_torch_e2e.py
Comment thread tests/special_e2e/test_torch_e2e.py Outdated
Comment thread tests/special_e2e/test_torch_e2e.py Outdated
Comment thread tests/special_e2e/test_torch_e2e.py Outdated
Comment thread docs/data/data_directory.md
@tardis-key
Copy link
Copy Markdown
Collaborator

ci name is not correct.

@756017542 756017542 changed the title [data, torch_profile] test: add st of torch [data, torch_profile] test: add st of torch and mstx Mar 19, 2026

- name: Install dependencies
run: |
pip install -r requirements.txt
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pip install 没有使用 --no-cache-dir,建议添加 --no-cache-dir 避免缓存问题


- name: Run profiling_data_analysis_st tests
run: |
pytest -s -x tests/special_e2e
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pytest 没有超时限制,建议添加 --timeout=300 或其他合适的超时设置


- name: Run profiling_data_analysis_st tests
run: |
pytest -s -x tests/special_e2e
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

文件末尾缺少空行,添加空行以符合POSIX标准

Comment thread docs/data/data_directory.md Outdated
```
### 数据解析文件 prof_*.json.gz,解析文件缺少字段见解析日志warning,解析文件内容示例:

![img_1.png](img_1.png)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use text instead of png

Comment thread docs/data/data_directory.md Outdated
└── <role>/
└── prof_*.json.gz
```
### 数据解析文件 prof_*.json.gz,解析文件内容包含distrubutedInfo、traceEvent等字段,数据内容一般包含ts、dur等字段,解析文件内容示例:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

标题太长,建议拆解成标题和正文

Comment thread docs/data/data_directory.md Outdated
└── ASCEND_PROFILER_OUTPUT/
└── trace_view.json
```
### 数据解析文件 trace_view.json,解析文件内容必须包含"ph": "M",且"name": "Overlap Analysis"对应"pid"的数据,该数据一般包含ts、dur等字段,解析文件内容示例:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

同上

@@ -0,0 +1,101 @@
[
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

修改文件路径,文件夹名字非公共部分可以用xxx表述

@@ -0,0 +1,50 @@
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

同上

@tardis-key tardis-key merged commit 19f838b into verl-project:main Mar 25, 2026
4 checks passed
@tardis-key tardis-key mentioned this pull request Mar 25, 2026
19 tasks
@Rhetee
Copy link
Copy Markdown
Collaborator

Rhetee commented Mar 26, 2026

/lgtm

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