synapse-sdk 2025.10.3__py3-none-any.whl → 2025.10.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of synapse-sdk might be problematic. Click here for more details.
- synapse_sdk/devtools/docs/docs/plugins/categories/pre-annotation-plugins/pre-annotation-plugin-overview.md +198 -0
- synapse_sdk/devtools/docs/docs/plugins/categories/pre-annotation-plugins/to-task-action-development.md +1645 -0
- synapse_sdk/devtools/docs/docs/plugins/categories/pre-annotation-plugins/to-task-overview.md +717 -0
- synapse_sdk/devtools/docs/docs/plugins/categories/pre-annotation-plugins/to-task-template-development.md +1380 -0
- synapse_sdk/devtools/docs/docs/plugins/categories/upload-plugins/upload-plugin-overview.md +25 -0
- synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/plugins/categories/pre-annotation-plugins/pre-annotation-plugin-overview.md +198 -0
- synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/plugins/categories/pre-annotation-plugins/to-task-action-development.md +1645 -0
- synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/plugins/categories/pre-annotation-plugins/to-task-overview.md +717 -0
- synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/plugins/categories/pre-annotation-plugins/to-task-template-development.md +1380 -0
- synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/plugins/categories/upload-plugins/upload-plugin-overview.md +25 -0
- synapse_sdk/devtools/docs/sidebars.ts +14 -0
- synapse_sdk/plugins/categories/export/actions/export/action.py +8 -3
- synapse_sdk/plugins/categories/export/actions/export/utils.py +108 -8
- synapse_sdk/plugins/categories/upload/actions/upload/action.py +8 -1
- synapse_sdk/plugins/categories/upload/actions/upload/context.py +0 -1
- synapse_sdk/plugins/categories/upload/actions/upload/steps/generate.py +6 -2
- synapse_sdk/plugins/categories/upload/actions/upload/steps/initialize.py +24 -9
- synapse_sdk/plugins/categories/upload/actions/upload/steps/metadata.py +27 -7
- synapse_sdk/plugins/categories/upload/actions/upload/steps/organize.py +45 -12
- synapse_sdk/plugins/categories/upload/actions/upload/steps/upload.py +10 -5
- synapse_sdk/plugins/categories/upload/actions/upload/strategies/file_discovery/flat.py +31 -6
- synapse_sdk/plugins/categories/upload/actions/upload/strategies/file_discovery/recursive.py +65 -37
- synapse_sdk/plugins/categories/upload/actions/upload/strategies/validation/default.py +17 -2
- {synapse_sdk-2025.10.3.dist-info → synapse_sdk-2025.10.5.dist-info}/METADATA +1 -1
- {synapse_sdk-2025.10.3.dist-info → synapse_sdk-2025.10.5.dist-info}/RECORD +29 -21
- {synapse_sdk-2025.10.3.dist-info → synapse_sdk-2025.10.5.dist-info}/WHEEL +0 -0
- {synapse_sdk-2025.10.3.dist-info → synapse_sdk-2025.10.5.dist-info}/entry_points.txt +0 -0
- {synapse_sdk-2025.10.3.dist-info → synapse_sdk-2025.10.5.dist-info}/licenses/LICENSE +0 -0
- {synapse_sdk-2025.10.3.dist-info → synapse_sdk-2025.10.5.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: pre-annotation-plugin-overview
|
|
3
|
+
title: Pre-annotation Plugin Overview
|
|
4
|
+
sidebar_position: 1
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Pre-annotation Plugin Overview
|
|
8
|
+
|
|
9
|
+
Pre-annotation plugins provide automated task annotation capabilities for the Synapse platform, enabling both file-based and AI-inference-based annotation workflows with comprehensive validation, progress tracking, and error handling.
|
|
10
|
+
|
|
11
|
+
## Quick Overview
|
|
12
|
+
|
|
13
|
+
**Category:** Pre-annotation
|
|
14
|
+
**Available Actions:** `to_task`
|
|
15
|
+
**Execution Method:** Job-based execution
|
|
16
|
+
|
|
17
|
+
## Key Features
|
|
18
|
+
|
|
19
|
+
- **File-based Annotation**: Automatically annotate tasks using JSON data from file URLs
|
|
20
|
+
- **Inference-based Annotation**: AI-powered annotation using pre-processor plugins and model inference
|
|
21
|
+
- **Strategy Pattern Architecture**: Pluggable validation, annotation, and metrics strategies
|
|
22
|
+
- **Workflow Orchestration**: 7-stage orchestrated workflow with automatic rollback on failure
|
|
23
|
+
- **Progress Tracking**: Real-time progress updates and comprehensive metrics
|
|
24
|
+
- **Flexible Task Filtering**: Advanced task filtering with multiple criteria
|
|
25
|
+
|
|
26
|
+
## Use Cases
|
|
27
|
+
|
|
28
|
+
- Bulk task annotation from pre-generated JSON files
|
|
29
|
+
- AI-powered auto-annotation using trained models
|
|
30
|
+
- Pre-labeling tasks before human review
|
|
31
|
+
- Dataset preparation with automated annotations
|
|
32
|
+
- Model-assisted annotation workflows
|
|
33
|
+
- Batch processing of pending tasks
|
|
34
|
+
|
|
35
|
+
## Supported Annotation Methods
|
|
36
|
+
|
|
37
|
+
### File-based Annotation (`method: 'file'`)
|
|
38
|
+
|
|
39
|
+
Retrieves annotation data from JSON files stored in data unit file specifications and applies them to tasks.
|
|
40
|
+
|
|
41
|
+
**When to use:**
|
|
42
|
+
|
|
43
|
+
- You have pre-generated annotation JSON files
|
|
44
|
+
- Annotations are stored as files in your data units
|
|
45
|
+
- You need deterministic, reproducible annotations
|
|
46
|
+
- External tools have generated annotation files
|
|
47
|
+
|
|
48
|
+
**Requirements:**
|
|
49
|
+
|
|
50
|
+
- `target_specification_name`: Name of the file specification containing annotation JSON
|
|
51
|
+
- Tasks must have data units with the specified file specification
|
|
52
|
+
- JSON files must be accessible via HTTP/HTTPS URLs
|
|
53
|
+
|
|
54
|
+
### Inference-based Annotation (`method: 'inference'`)
|
|
55
|
+
|
|
56
|
+
Uses pre-processor plugins to run model inference on task data and generate annotations automatically.
|
|
57
|
+
|
|
58
|
+
**When to use:**
|
|
59
|
+
|
|
60
|
+
- You have a trained model for automated annotation
|
|
61
|
+
- You want AI-assisted annotation
|
|
62
|
+
- You need to process images/data through a model
|
|
63
|
+
- You're implementing active learning workflows
|
|
64
|
+
|
|
65
|
+
**Requirements:**
|
|
66
|
+
|
|
67
|
+
- `pre_processor`: ID of a deployed pre-processor plugin
|
|
68
|
+
- Pre-processor must be active and running
|
|
69
|
+
- Tasks must have primary images or compatible data
|
|
70
|
+
|
|
71
|
+
## Configuration Overview
|
|
72
|
+
|
|
73
|
+
### Basic Parameters
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"name": "Annotation Job",
|
|
78
|
+
"description": "Annotate pending tasks",
|
|
79
|
+
"project": 123,
|
|
80
|
+
"agent": 1,
|
|
81
|
+
"task_filters": {
|
|
82
|
+
"status": "pending"
|
|
83
|
+
},
|
|
84
|
+
"method": "file"
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Key Parameters
|
|
89
|
+
|
|
90
|
+
| Parameter | Type | Required | Description |
|
|
91
|
+
| --------------------------- | ------- | ----------- | -------------------------------------------------- |
|
|
92
|
+
| `name` | string | Yes | Action name (no whitespace) |
|
|
93
|
+
| `description` | string | No | Action description |
|
|
94
|
+
| `project` | integer | Yes | Project ID |
|
|
95
|
+
| `agent` | integer | Yes | Agent ID |
|
|
96
|
+
| `task_filters` | object | Yes | Task filtering criteria |
|
|
97
|
+
| `method` | string | Yes | Annotation method: `'file'` or `'inference'` |
|
|
98
|
+
| `target_specification_name` | string | Conditional | File specification name (required for file method) |
|
|
99
|
+
| `pre_processor` | integer | Conditional | Pre-processor ID (required for inference method) |
|
|
100
|
+
| `pre_processor_params` | object | No | Pre-processor configuration parameters |
|
|
101
|
+
|
|
102
|
+
## Quick Start
|
|
103
|
+
|
|
104
|
+
### File-based Annotation Example
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
from synapse_sdk.plugins.categories.pre_annotation.actions.to_task import ToTaskAction
|
|
108
|
+
|
|
109
|
+
params = {
|
|
110
|
+
'name': 'File_Annotation_Job',
|
|
111
|
+
'project': 123,
|
|
112
|
+
'agent': 1,
|
|
113
|
+
'task_filters': {
|
|
114
|
+
'status': 'pending',
|
|
115
|
+
'data_collection': 456
|
|
116
|
+
},
|
|
117
|
+
'method': 'file',
|
|
118
|
+
'target_specification_name': 'annotation_data'
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
action = ToTaskAction(run=run_instance, params=params)
|
|
122
|
+
result = action.start()
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Inference-based Annotation Example
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
params = {
|
|
129
|
+
'name': 'AI_Annotation_Job',
|
|
130
|
+
'project': 123,
|
|
131
|
+
'agent': 1,
|
|
132
|
+
'task_filters': {
|
|
133
|
+
'status': 'pending'
|
|
134
|
+
},
|
|
135
|
+
'method': 'inference',
|
|
136
|
+
'pre_processor': 789,
|
|
137
|
+
'pre_processor_params': {
|
|
138
|
+
'confidence_threshold': 0.8
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
action = ToTaskAction(run=run_instance, params=params)
|
|
143
|
+
result = action.start()
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Workflow Stages
|
|
147
|
+
|
|
148
|
+
The to_task action executes through a 7-stage orchestrated workflow:
|
|
149
|
+
|
|
150
|
+
1. **Project Validation** - Verify project exists and has data collection
|
|
151
|
+
2. **Task Validation** - Find and validate tasks matching filters
|
|
152
|
+
3. **Method Determination** - Identify annotation method (file or inference)
|
|
153
|
+
4. **Method Validation** - Validate method-specific requirements
|
|
154
|
+
5. **Processing Initialization** - Set up metrics and progress tracking
|
|
155
|
+
6. **Task Processing** - Execute annotation strategy for each task
|
|
156
|
+
7. **Finalization** - Aggregate final metrics and results
|
|
157
|
+
|
|
158
|
+
Each stage is validated and can trigger automatic rollback on failure.
|
|
159
|
+
|
|
160
|
+
## Progress and Metrics
|
|
161
|
+
|
|
162
|
+
The action provides real-time updates on:
|
|
163
|
+
|
|
164
|
+
- **Progress Percentage**: Overall completion percentage
|
|
165
|
+
- **Success Count**: Number of successfully annotated tasks
|
|
166
|
+
- **Failed Count**: Number of tasks that failed annotation
|
|
167
|
+
- **Standby Count**: Number of tasks not yet processed
|
|
168
|
+
|
|
169
|
+
## Error Handling
|
|
170
|
+
|
|
171
|
+
### Task-Level Errors
|
|
172
|
+
|
|
173
|
+
Individual task failures are logged and tracked but do not stop the overall workflow. The action continues processing remaining tasks.
|
|
174
|
+
|
|
175
|
+
### Critical Errors
|
|
176
|
+
|
|
177
|
+
System-level errors (e.g., invalid project, network failures) trigger immediate workflow termination and rollback of completed steps.
|
|
178
|
+
|
|
179
|
+
### Automatic Rollback
|
|
180
|
+
|
|
181
|
+
On critical failures, the orchestrator automatically rolls back:
|
|
182
|
+
|
|
183
|
+
- Clears cached project data
|
|
184
|
+
- Resets task ID lists
|
|
185
|
+
- Cleans up temporary files
|
|
186
|
+
- Reverts metrics
|
|
187
|
+
|
|
188
|
+
## Next Steps
|
|
189
|
+
|
|
190
|
+
- **User Guide**: Read the [ToTask Overview](./to-task-overview.md) for detailed usage instructions
|
|
191
|
+
- **Developer Guide**: See the [ToTask Action Development](./to-task-action-development.md) for architecture details
|
|
192
|
+
- **API Reference**: Explore the complete API documentation
|
|
193
|
+
|
|
194
|
+
## Related Documentation
|
|
195
|
+
|
|
196
|
+
- [Upload Plugins](../upload-plugins/upload-plugin-overview.md) - File upload and data ingestion
|
|
197
|
+
- Plugin Development Guide - Creating custom plugins
|
|
198
|
+
- Pre-processor Plugins - Model deployment and inference
|