-
Notifications
You must be signed in to change notification settings - Fork 211
Add workflow results #1275
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
Add workflow results #1275
Conversation
Signed-off-by: Praateek <[email protected]>
…dd-workflow-results Signed-off-by: Praateek <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Signed-off-by: Praateek <[email protected]>
Signed-off-by: Praateek <[email protected]>
Signed-off-by: Praateek <[email protected]>
Signed-off-by: Praateek <[email protected]>
Signed-off-by: Praateek <[email protected]>
Signed-off-by: Praateek <[email protected]>
Signed-off-by: Praateek <[email protected]>
Signed-off-by: Praateek <[email protected]>
|
/ok to test af0787c |
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.
1 file reviewed, 1 comment
| total_start_time = time.time() | ||
| workflow_result = WorkflowRunResult(workflow_name="text_semantic_deduplication") | ||
| num_duplicates_identified = 0 |
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.
timing variables (embedding_time, semantic_time, removal_time, total_time) defined inside try block (lines 472, 495, 509, 526) but referenced after except block (lines 550-554). if exception occurs before assignment, NameError will occur.
| total_start_time = time.time() | |
| workflow_result = WorkflowRunResult(workflow_name="text_semantic_deduplication") | |
| num_duplicates_identified = 0 | |
| total_start_time = time.time() | |
| workflow_result = WorkflowRunResult(workflow_name="text_semantic_deduplication") | |
| num_duplicates_identified = 0 | |
| embedding_time = 0.0 | |
| semantic_time = 0.0 | |
| removal_time = 0.0 | |
| total_time = 0.0 |
Description
This pull request refactors the workflow interfaces for the deduplication pipelines (exact, fuzzy, and semantic) to standardize their outputs and improve usability.
Core API and Interface Refactoring
WorkflowRunResultdataclass innemo_curator/pipeline/workflow.pyto encapsulate workflow outputs, pipeline task mappings, and metadata. Also added an abstractWorkflowBaseclass to standardize workflow interfaces.ExactDeduplicationWorkflow,FuzzyDeduplicationWorkflow,SemanticDeduplicationWorkflow) to inherit fromWorkflowBaseand to return aWorkflowRunResultfrom theirrunmethods, instead of returningNoneor a dictionary.Workflow Output and Metadata Improvements
runmethods of all workflows to collect and record detailed timing and result metadata (such as per-stage execution times and duplicate counts) into theWorkflowRunResultobject.Usage
# Add snippet demonstrating usageChecklist