Skip to content
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

[Feat] update proprocessing with new params #1

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yingfhu
Copy link
Contributor

@yingfhu yingfhu commented Sep 1, 2023

No description provided.

Comment on lines -390 to -404
code_splits = code.split("\n")
is_empty_line = False
ind_empty_line = None
for i, line in enumerate(code_splits):
if len(line.strip()) > 0 and line[0] != ' ' and line[0] != '\t':
is_empty_line = True
ind_empty_line = i
break
if is_empty_line:
code = "\n".join(code_splits[:ind_empty_line])
else:
end_words = ["\ndef", "\nclass", "\n#", "\nassert", '\n"""', "\nprint", "\nif", "\n\n\n"]
for w in end_words:
if w in code:
code = code[:code.rfind(w)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

此处是否可以保留?因为 code-evaluator 应该是可以脱离 opencompass 单独存在的。

如果 opencompass 中处理了一遍后,在 code-evaluator 中再处理一遍是否会有问题?没问题的话,我倾向于保留这段逻辑。

@Leymore
Copy link
Collaborator

Leymore commented Jan 26, 2024

该 PR 主要用于 WizardCode 的测试,后面没用上,先标 draft 了

@Leymore Leymore marked this pull request as draft January 26, 2024 04:01
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.

2 participants