Open
Conversation
|
Thanks for your contribution! |
Xreki
reviewed
Mar 23, 2026
Xreki
reviewed
Mar 24, 2026
| WHERE s.deleted = 0 | ||
| AND s.sample_type != 'full_graph' | ||
| ) sub | ||
| WHERE sub.rn = 1 |
Contributor
Author
There was a problem hiding this comment.
去重吧,防止一个sample被重复选取
|
|
||
| def get_v2_group_members(candidates: list[CandidateGraph], num_dtypes: int): | ||
| # Index candidates by op_seq | ||
| by_op_seq = defaultdict(list) |
| b.input_shapes_bucket_id, | ||
| b.input_dtypes_bucket_id, | ||
| s.graph_hash, | ||
| ROW_NUMBER() OVER ( |
Collaborator
There was a problem hiding this comment.
graph_hash不需要了吧?ROW_NUMBER在这里的作用是什么?
Contributor
Author
There was a problem hiding this comment.
在每个 (op_seq, shapes, dtypes) 分区内,按创建时间排序编号,然后只取 rn = 1(最早的那条)。作用是桶内去重:同一个桶里可能有多个样本,只保留一个代表。
不过现在代码改了很多
| """ | ||
|
|
||
| # Index candidates by op_seq | ||
| by_op_seq = defaultdict(list) |
Contributor
Author
There was a problem hiding this comment.
candidates_by_op_seq,润色一下
| for c in candidates: | ||
| by_op_seq[c.op_seq_bucket_id].append(c) | ||
|
|
||
| rule3_selected_uids = set() |
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.
PR Category
Feature Enhancement
Description
新增group分组规则