[Feat] update proprocessing with new params#1
Draft
yingfhu wants to merge 1 commit intoopen-compass:masterfrom
Draft
[Feat] update proprocessing with new params#1yingfhu wants to merge 1 commit intoopen-compass:masterfrom
yingfhu wants to merge 1 commit intoopen-compass:masterfrom
Conversation
Leymore
reviewed
Jan 26, 2024
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)] |
Collaborator
There was a problem hiding this comment.
此处是否可以保留?因为 code-evaluator 应该是可以脱离 opencompass 单独存在的。
如果 opencompass 中处理了一遍后,在 code-evaluator 中再处理一遍是否会有问题?没问题的话,我倾向于保留这段逻辑。
Collaborator
|
该 PR 主要用于 WizardCode 的测试,后面没用上,先标 draft 了 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.