-
Notifications
You must be signed in to change notification settings - Fork 36
[data, torch_profile] test: add st of torch and mstx #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
6b9ec5e
add st of torch
611ac8a
delate json
1ec779e
add special_e2e
fcc73d1
code check
396af62
code check
2cd7aea
add special_e2e.yml
57023db
mv data and fix bug
c4d6066
bugfix
46cea5e
add st of mstx
69c7e49
Revise inspection comments
577e936
change st name
20d174c
Add data description
e1ca74c
add data file
45b81c0
delate st --timeout=300
24bbc48
delate img.png
afe614e
revise data_directory
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: special_e2e | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - v0.* | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - v0.* | ||
| paths: | ||
| - "**/*.py" | ||
| - .github/workflows/special_e2e.yml | ||
| - "tests/special_e2e/**" | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| cluster_analyse: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.11"] | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| pip install -r requirements.txt | ||
| pip install -e . | ||
|
|
||
| - name: Run special_e2e tests | ||
| run: | | ||
| pytest -s -x tests/special_e2e | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pytest 没有超时限制,建议添加 --timeout=300 或其他合适的超时设置
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 文件末尾缺少空行,添加空行以符合POSIX标准 |
||
Binary file added
BIN
+878 Bytes
data/torch_data/profile_meta/actor_compute_log_prob/prof_rank-0_031847.json.gz
Binary file not shown.
Binary file added
BIN
+879 Bytes
data/torch_data/profile_meta/actor_compute_log_prob/prof_rank-1_031847.json.gz
Binary file not shown.
Binary file added
BIN
+878 Bytes
data/torch_data/profile_meta/actor_update/prof_rank-0_031904.json.gz
Binary file not shown.
Binary file added
BIN
+879 Bytes
data/torch_data/profile_meta/actor_update/prof_rank-1_031904.json.gz
Binary file not shown.
Binary file added
BIN
+1 KB
...file_meta/agent_loop_rollout_replica_0/huawei_372640.1771730291744166997.pt.trace.json.gz
Binary file not shown.
Binary file added
BIN
+1 KB
...file_meta/agent_loop_rollout_replica_0/huawei_372640.1771730370159969000.pt.trace.json.gz
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # RL-Insight - 数据文件目录结构 | ||
|
tardis-key marked this conversation as resolved.
|
||
|
|
||
| ## 一、采集Torch Profiling 数据目录结构 | ||
|
|
||
| ``` | ||
| <profile-data-path>/ | ||
| └── <role>/ | ||
| └── prof_*.json.gz | ||
| ``` | ||
|
|
||
| ## 二、采集Mstx Profiling 数据目录结构 | ||
|
|
||
| ``` | ||
| <profile-data-path>/ | ||
| └── <role>/ | ||
| └── *_ascend_pt/ | ||
| |── profiler_info_*.json | ||
| └── ASCEND_PROFILER_OUTPUT/ | ||
| └── trace_view.json | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright (c) 2025 verl-project authors. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Copyright (c) 2025 verl-project authors. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| import sys | ||
| from pathlib import Path | ||
| from rl_insight.main import main | ||
|
|
||
|
|
||
| def test_torch_e2e_with_input_path(monkeypatch, tmp_path): | ||
| # Get the root directory of the project | ||
| current_file = Path(__file__).resolve() | ||
| project_root = current_file.parents[2] | ||
|
|
||
| # Get the input data path | ||
| input_dir = project_root / "data" / "torch_data" | ||
| output_dir = tmp_path / "torch_output" | ||
|
tardis-key marked this conversation as resolved.
|
||
|
|
||
| # Ensure the input directory exists | ||
| assert input_dir.exists(), f"Input directory {input_dir} does not exist" | ||
|
|
||
| # Set command line parameters | ||
| test_args = [ | ||
| "main.py", | ||
| f"--input-path={input_dir}", | ||
| f"--output-path={output_dir}", | ||
| "--profiler-type=torch", | ||
| ] | ||
| monkeypatch.setattr(sys, "argv", test_args) | ||
|
|
||
| main() | ||
|
|
||
| # Verify output file | ||
| output_file = output_dir / "rl_timeline.html" | ||
| assert output_file.exists() | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 避免缓存问题