Skip to content

Commit 82bc896

Browse files
corbtampcode-com
andauthored
Fix trajectory group duplication in gather_trajectory_groups (#312)
The after_each callback in gather_trajectory_groups was causing group duplication by appending returned groups to the existing processed_groups list. This resulted in both the original groups and the groups returned by the callback being included in the final result. Fixed by resetting processed_groups to an empty list before collecting the after_each callback results, ensuring only the callback-returned groups are included in the final output. Amp-Thread-ID: https://ampcode.com/threads/T-46ce9369-cd67-44ca-b963-75c14498132e Co-authored-by: Amp <[email protected]>
1 parent ab57ee9 commit 82bc896

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/art/gather.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ async def gather_trajectory_groups(
4848
ae_processed_groups = await asyncio.gather(
4949
*(after_each(g) for g in processed_groups)
5050
)
51+
processed_groups = []
5152
for g in ae_processed_groups:
5253
if g is None:
5354
continue

0 commit comments

Comments
 (0)