Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cluster_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:

- name: Run cluster_analyse tests
run: |
pytest -s -x tests/cluster_analysis
pytest -s -x tests/cluster_analysis
47 changes: 47 additions & 0 deletions .github/workflows/special_e2e.yml
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

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 避免缓存问题

pip install -e .

- name: Run special_e2e 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 或其他合适的超时设置

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标准

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions docs/data/data_directory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# RL-Insight - 数据文件目录结构
Comment thread
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
```
13 changes: 13 additions & 0 deletions tests/special_e2e/__init__.py
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.
45 changes: 45 additions & 0 deletions tests/special_e2e/test_torch_e2e.py
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"
Comment thread
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()
Loading