Skip to content

Conversation

littlegy
Copy link
Contributor

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Please describe the motivation of this PR and the goal you want to achieve through this PR.

Modification

Please briefly describe what modification is made in this PR.

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

if len(model_list) > 0:

if tp_num > 1:
communicators = ['native', 'nccl']
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please change native to cuda-ipc, since we are going to deprecate native, which is alias to cuda-ipc

@@ -0,0 +1,90 @@
import pytest
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file is a copy of test_api_evaluate_pytorch.
Could you provide a unified test_api_evaluation.py?

@@ -0,0 +1,137 @@
name: api_eva
Copy link
Collaborator

Choose a reason for hiding this comment

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

may use api_eva and rename the filename api_eval.yml

Comment on lines 16 to 37
if work_dir and os.path.exists(work_dir):
try:
summary_dirs = glob.glob(os.path.join(work_dir, '*', 'summary'))
if summary_dirs:
summary_dir = summary_dirs[0]
csv_files = glob.glob(os.path.join(summary_dir, 'summary_*.csv'))
if csv_files:
csv_file = sorted(csv_files)[-1]
if os.path.exists(csv_file):
with open(csv_file, 'r') as f:
reader = csv.reader(f)
next(reader)
for row in reader:
if len(row) >= 5 and row[4]:
dataset = row[0]
metric_value = row[4]
try:
metrics[dataset] = f'{float(metric_value):.2f}'
except ValueError:
metrics[dataset] = metric_value
except Exception as e:
print(f'Error reading metrics: {str(e)}')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we simplify this code snippet? The indent is too deep

Comment on lines 46 to 53
write_header = False
if not os.path.exists(summary_file) or os.path.getsize(summary_file) == 0:
write_header = True
else:
with open(summary_file, 'r') as f:
first_lines = f.read(200)
if '| Model | Backend | TP | Status | mmlu | gsm8k |' not in first_lines:
write_header = True
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we change it to the following?

write_header = not os.path.exists(summary_file) or os.path.getsize(summary_file) == 0

May kindly let us know in what cases the first line are not the "| Model | Backend | TP | Status | mmlu | gsm8k |"

Copy link
Collaborator

@zhulinJulia24 zhulinJulia24 left a comment

Choose a reason for hiding this comment

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

LTGM

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.

3 participants