-
Notifications
You must be signed in to change notification settings - Fork 415
Refactor segmenting logic #1664
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
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThe segment pipeline is refactored from a fixed, linear composition to a data-driven, stage-based architecture. A new generic Changes
Sequence DiagramsequenceDiagram
participant Caller
participant buildSegments
participant runSegmentPipeline
participant Stage as Stage Pipeline<br/>(SEGMENT_PIPELINE)
participant SharedTypes as Graph & Keys
Caller->>buildSegments: call buildSegments(ctx)
buildSegments->>buildSegments: create initialGraph
buildSegments->>runSegmentPipeline: runSegmentPipeline(initialGraph)
loop For each stage in SEGMENT_PIPELINE
runSegmentPipeline->>Stage: validate input keys present
rect rgba(200, 220, 255, 0.3)
note over Stage: Stage: normalizeWordsPass<br/>Input: needs "frames"<br/>Output: ensures "words"
end
Stage->>SharedTypes: run pass.run(graph, ctx)
SharedTypes-->>Stage: validate output key
Stage-->>runSegmentPipeline: graph with new key
rect rgba(200, 220, 255, 0.3)
note over Stage: Stage: resolveIdentitiesPass<br/>Input: needs "words"<br/>Output: ensures "frames"
end
rect rgba(200, 220, 255, 0.3)
note over Stage: Stage: segmentationPass<br/>Input: needs "frames"<br/>Output: ensures "segments"
end
rect rgba(200, 220, 255, 0.3)
note over Stage: Stage: identityPropagationPass<br/>Input: needs "segments"<br/>Output: ensures final segments
end
end
runSegmentPipeline-->>buildSegments: completed graph
buildSegments->>buildSegments: ensureGraphHasKeys("segments")
buildSegments->>buildSegments: finalizeSegments(graph)
buildSegments-->>Caller: final segments result
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Areas requiring extra attention:
Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
No description provided.