Skip to content

[RL] reinforce learning benchmark framework #10619

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

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from

Conversation

SdeeRK
Copy link
Contributor

@SdeeRK SdeeRK commented May 19, 2025

PR types

[ New features]

PR changes

[Benchmark Tools]

Description

This PR introduces a comprehensive benchmark testing framework with three core components:

  1. torch_infer.py - PyTorch model inference performance testing
  2. paddle_infer.py - PaddlePaddle model inference benchmarking
  3. api_serve.py - API service performance testing

The framework provides standardized metrics collection including:

  • Inference throughput (tokens/second)
  • Generated token length analysis
  • Token generation time statistics

Execution Scripts​​
Corresponding launch scripts are available in the scripts/ directory:

  1. api_serve.sh - API service testing
  2. paddle_infer.sh - PaddlePaddle benchmark
  3. torch_infer.sh - PyTorch benchmark

Copy link

paddle-bot bot commented May 19, 2025

Thanks for your contribution!

@gongel
Copy link
Member

gongel commented May 19, 2025

  1. 添加下使用文档;2. 函数注释统一换成英文

Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.91%. Comparing base (5c482b6) to head (b507eeb).
Report is 8 commits behind head on develop.

❌ Your project check has failed because the head coverage (46.91%) is below the target coverage (58.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10619      +/-   ##
===========================================
- Coverage    46.91%   46.91%   -0.01%     
===========================================
  Files          799      799              
  Lines       132452   132460       +8     
===========================================
+ Hits         62137    62140       +3     
- Misses       70315    70320       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.



@contextmanager
def switch_level_context(level="ERROR"):
Copy link
Member

Choose a reason for hiding this comment

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

torch不需要这个,删除了

import pandas as pd
from openai import AsyncOpenAI
from tqdm import tqdm
from transformers import logging
Copy link
Member

Choose a reason for hiding this comment

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

用paddlenlp的logger吧,看一下paddle infer的代码

@JunnYu JunnYu changed the title reinforce learning benchmark framework [RL] reinforce learning benchmark framework May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants