-
Notifications
You must be signed in to change notification settings - Fork 91
报告和代码 #244
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
vansonquach69-cmyk
wants to merge
1
commit into
FlagAI-Open:main
Choose a base branch
from
vansonquach69-cmyk:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
报告和代码 #244
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 逻辑漏洞:缓存
examples_str会破坏动态检索和混合上下文长度策略在当前的实现中,
examples_str在循环外部被初始化为None,并在第一次迭代(sample_idx == 0)中被赋值后缓存。这会导致两个严重问题:select_examples_M05、select_examples_M19和select_examples_M20这样的高级选择方法依赖于当前样本的text2annotate来计算相似度并检索最相关的 few-shot 示例。缓存examples_str意味着所有后续的测试样本都将重复使用为第一个样本检索的示例,从而完全使动态检索失效。select_examples中)使用sample_index < 50来为前 50 个样本分配 30k 的上下文预算,并将其余样本限制为 8k 以提高效率。由于select_func仅在sample_idx = 0时被调用一次,30k 预算的 prompt 被缓存并重复用于所有后续样本,完全绕过了 8k 优化,严重降低了评估性能。建议:移除
if examples_str is None:检查,以便为每个样本动态评估select_func。