synapse-sdk 1.0.0b12__py3-none-any.whl → 1.0.0b14__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.

Files changed (86) hide show
  1. locale/ko/LC_MESSAGES/messages.mo +0 -0
  2. synapse_sdk/clients/agent/ray.py +9 -11
  3. synapse_sdk/clients/backend/annotation.py +1 -1
  4. synapse_sdk/clients/backend/core.py +31 -4
  5. synapse_sdk/clients/backend/data_collection.py +78 -5
  6. synapse_sdk/clients/backend/hitl.py +1 -1
  7. synapse_sdk/clients/backend/ml.py +1 -1
  8. synapse_sdk/clients/base.py +23 -16
  9. synapse_sdk/devtools/docs/docs/api/clients/agent.md +43 -0
  10. synapse_sdk/devtools/docs/docs/api/clients/backend.md +53 -0
  11. synapse_sdk/devtools/docs/docs/api/clients/base.md +35 -0
  12. synapse_sdk/devtools/docs/docs/api/clients/ray.md +321 -0
  13. synapse_sdk/devtools/docs/docs/api/index.md +52 -0
  14. synapse_sdk/devtools/docs/docs/api/plugins/categories.md +43 -0
  15. synapse_sdk/devtools/docs/docs/api/plugins/models.md +59 -0
  16. synapse_sdk/devtools/docs/docs/api/plugins/utils.md +328 -0
  17. synapse_sdk/devtools/docs/docs/api/utils/file.md +195 -0
  18. synapse_sdk/devtools/docs/docs/api/utils/network.md +378 -0
  19. synapse_sdk/devtools/docs/docs/api/utils/storage.md +57 -0
  20. synapse_sdk/devtools/docs/docs/api/utils/types.md +51 -0
  21. synapse_sdk/devtools/docs/docs/categories.md +0 -0
  22. synapse_sdk/devtools/docs/docs/cli-usage.md +280 -0
  23. synapse_sdk/devtools/docs/docs/concepts/index.md +38 -0
  24. synapse_sdk/devtools/docs/docs/configuration.md +83 -0
  25. synapse_sdk/devtools/docs/docs/contributing.md +306 -0
  26. synapse_sdk/devtools/docs/docs/examples/index.md +29 -0
  27. synapse_sdk/devtools/docs/docs/faq.md +179 -0
  28. synapse_sdk/devtools/docs/docs/features/converters/index.md +455 -0
  29. synapse_sdk/devtools/docs/docs/features/index.md +24 -0
  30. synapse_sdk/devtools/docs/docs/features/plugins/index.md +509 -0
  31. synapse_sdk/devtools/docs/docs/installation.md +94 -0
  32. synapse_sdk/devtools/docs/docs/introduction.md +47 -0
  33. synapse_sdk/devtools/docs/docs/quickstart.md +78 -0
  34. synapse_sdk/devtools/docs/docs/troubleshooting.md +519 -0
  35. synapse_sdk/devtools/docs/docs/tutorial-basics/_category_.json +8 -0
  36. synapse_sdk/devtools/docs/docs/tutorial-basics/congratulations.md +23 -0
  37. synapse_sdk/devtools/docs/docs/tutorial-basics/create-a-blog-post.md +34 -0
  38. synapse_sdk/devtools/docs/docs/tutorial-basics/create-a-document.md +57 -0
  39. synapse_sdk/devtools/docs/docs/tutorial-basics/create-a-page.md +43 -0
  40. synapse_sdk/devtools/docs/docs/tutorial-basics/deploy-your-site.md +31 -0
  41. synapse_sdk/devtools/docs/docs/tutorial-basics/markdown-features.mdx +152 -0
  42. synapse_sdk/devtools/docs/docs/tutorial-extras/_category_.json +7 -0
  43. synapse_sdk/devtools/docs/docs/tutorial-extras/img/docsVersionDropdown.png +0 -0
  44. synapse_sdk/devtools/docs/docs/tutorial-extras/img/localeDropdown.png +0 -0
  45. synapse_sdk/devtools/docs/docs/tutorial-extras/manage-docs-versions.md +55 -0
  46. synapse_sdk/devtools/docs/docs/tutorial-extras/translate-your-site.md +88 -0
  47. synapse_sdk/devtools/docs/docusaurus.config.ts +5 -3
  48. synapse_sdk/devtools/docs/i18n/ko/code.json +325 -0
  49. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/clients/agent.md +43 -0
  50. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/clients/backend.md +53 -0
  51. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/clients/base.md +35 -0
  52. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/clients/ray.md +321 -0
  53. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/index.md +52 -0
  54. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/utils/file.md +195 -0
  55. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/utils/network.md +378 -0
  56. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/utils/storage.md +60 -0
  57. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/api/utils/types.md +51 -0
  58. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/categories.md +0 -0
  59. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/cli-usage.md +280 -0
  60. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/concepts/index.md +38 -0
  61. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/configuration.md +83 -0
  62. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/contributing.md +306 -0
  63. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/examples/index.md +29 -0
  64. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/faq.md +179 -0
  65. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/features/converters/index.md +30 -0
  66. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/features/index.md +24 -0
  67. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/features/plugins/index.md +30 -0
  68. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/installation.md +94 -0
  69. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/introduction.md +47 -0
  70. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/quickstart.md +78 -0
  71. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current/troubleshooting.md +519 -0
  72. synapse_sdk/devtools/docs/i18n/ko/docusaurus-plugin-content-docs/current.json +22 -0
  73. synapse_sdk/devtools/docs/i18n/ko/docusaurus-theme-classic/footer.json +42 -0
  74. synapse_sdk/devtools/docs/i18n/ko/docusaurus-theme-classic/navbar.json +18 -0
  75. synapse_sdk/devtools/docs/node_modules/shell-quote/print.py +3 -0
  76. synapse_sdk/devtools/docs/package.json +1 -1
  77. synapse_sdk/plugins/categories/export/actions/export.py +50 -2
  78. synapse_sdk/plugins/categories/export/templates/plugin/export.py +15 -2
  79. synapse_sdk/plugins/categories/upload/actions/upload.py +42 -27
  80. synapse_sdk/utils/file.py +77 -0
  81. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/METADATA +1 -1
  82. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/RECORD +86 -20
  83. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/WHEEL +0 -0
  84. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/entry_points.txt +0 -0
  85. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/licenses/LICENSE +0 -0
  86. {synapse_sdk-1.0.0b12.dist-info → synapse_sdk-1.0.0b14.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,519 @@
1
+ ---
2
+ id: troubleshooting
3
+ title: 문제 해결
4
+ sidebar_position: 10
5
+ ---
6
+
7
+ # 문제 해결
8
+
9
+ Synapse SDK 사용 시 발생하는 일반적인 문제와 해결방법입니다.
10
+
11
+ ## 설치 문제
12
+
13
+ ## 인증 문제
14
+
15
+ ### ClientError: 401 Unauthorized
16
+
17
+ **증상**: API 호출이 401 오류로 실패합니다.
18
+
19
+ **진단 단계**:
20
+
21
+
22
+ 3. **CLI를 통한 토큰 확인**:
23
+ ```bash
24
+ # 토큰을 확인하기 위한 대화형 설정 사용
25
+ synapse config
26
+ # "Show current configuration" 선택
27
+ # 토큰이 검증을 위해 평문으로 표시됩니다
28
+ ```
29
+
30
+ 4. **코드에서 토큰 확인**:
31
+ ```python
32
+ from synapse_sdk.clients.backend import BackendClient
33
+
34
+ client = BackendClient(
35
+ base_url="https://api.synapse.sh",
36
+ api_token="your-token" # "Token " 접두사 없음
37
+ )
38
+
39
+ try:
40
+ user = client.get_current_user()
41
+ print(f"Authenticated as: {user.email}")
42
+ except Exception as e:
43
+ print(f"Auth failed: {e}")
44
+ ```
45
+
46
+ **일반적인 해결방법**:
47
+ - 웹 인터페이스에서 토큰 재생성
48
+ - 토큰이 만료되지 않았는지 확인
49
+ - 올바른 백엔드 URL 확인
50
+
51
+ ### Agent 인증 오류
52
+
53
+ **증상**: Agent 관련 작업이 실패합니다.
54
+
55
+ **해결방법**:
56
+
57
+ 1. **Agent 설정 확인**:
58
+ ```bash
59
+ synapse config
60
+ # "Show current configuration" 선택
61
+ # 백엔드와 Agent 토큰 모두 평문으로 표시됩니다
62
+ ```
63
+
64
+ 2. **Agent 토큰 확인**:
65
+ ```python
66
+ from synapse_sdk.clients.agent import AgentClient
67
+
68
+ client = AgentClient(
69
+ base_url="https://api.synapse.sh",
70
+ agent_token="your-agent-token"
71
+ )
72
+ ```
73
+
74
+ ## 연결 문제
75
+
76
+ ### 연결 시간 초과
77
+
78
+ **증상**: 요청이 시간 초과되거나 멈춤 상태가 됩니다.
79
+
80
+ **해결방법**:
81
+
82
+ 1. **시간 초과 값 증가**:
83
+ ```python
84
+ client = BackendClient(
85
+ base_url="https://api.synapse.sh",
86
+ api_token="your-token",
87
+ timeout={'connect': 30, 'read': 120}
88
+ )
89
+ ```
90
+
91
+ 2. **네트워크 연결 확인**:
92
+ ```bash
93
+ # 기본 연결 테스트
94
+ ping api.synapse.sh
95
+
96
+ # HTTPS 접근 테스트
97
+ curl -I https://api.synapse.sh/health
98
+ ```
99
+
100
+ 3. **필요시 프록시 설정**:
101
+ ```bash
102
+ export HTTP_PROXY="http://proxy.company.com:8080"
103
+ export HTTPS_PROXY="https://proxy.company.com:8080"
104
+ ```
105
+
106
+ ### DNS 해결 문제
107
+
108
+ **증상**: "Name or service not known" 오류가 발생합니다.
109
+
110
+ **해결방법**:
111
+
112
+ 1. **DNS 설정 확인**:
113
+ ```bash
114
+ nslookup api.synapse.sh
115
+ ```
116
+
117
+ 2. **대체 DNS 시도**:
118
+ ```bash
119
+ # Google DNS 임시 사용
120
+ export SYNAPSE_BACKEND_HOST="$(dig @8.8.8.8 api.synapse.sh +short)"
121
+ ```
122
+
123
+ 3. **IP 주소 직접 사용** (임시):
124
+ ```python
125
+ client = BackendClient(base_url="https://192.168.1.100:8000")
126
+ ```
127
+
128
+ ## 플러그인 개발 문제
129
+
130
+ ### 플러그인 가져오기 오류
131
+
132
+ **증상**: 플러그인 로딩 또는 가져오기가 실패합니다.
133
+
134
+ **진단**:
135
+ ```bash
136
+ # 플러그인 구문 테스트
137
+ python -m py_compile plugin/__init__.py
138
+
139
+ # 순환 가져오기 확인
140
+ python -c "import plugin; print('OK')"
141
+ ```
142
+
143
+ **해결방법**:
144
+
145
+ 1. **구문 오류 수정**:
146
+ ```bash
147
+ # 린팅 사용
148
+ pip install ruff
149
+ ruff check plugin/
150
+ ```
151
+
152
+ 2. **가져오기 경로 확인**:
153
+ ```python
154
+ # plugin/__init__.py에서
155
+ from synapse_sdk.plugins.categories.base import Action, register_action
156
+ # 아님: from synapse_sdk.plugins.base import Action
157
+ ```
158
+
159
+ 3. **플러그인 구조 확인**:
160
+ ```
161
+ my-plugin/
162
+ ├── config.yaml
163
+ ├── plugin/
164
+ │ └── __init__.py
165
+ ├── requirements.txt
166
+ └── README.md
167
+ ```
168
+
169
+ ### 플러그인 실행 실패
170
+
171
+ **증상**: 플러그인이 시작되지만 실행 중 실패합니다.
172
+
173
+ **디버깅 단계**:
174
+
175
+ 1. **CLI를 통한 디버그 모드 활성화**:
176
+ ```bash
177
+ synapse
178
+ # "Plugin Management" 선택
179
+ # "Run plugin locally" 선택
180
+ # 액션과 매개변수 입력
181
+ # 로컬 실행 시 디버그 모드가 기본적으로 활성화됩니다
182
+ ```
183
+
184
+ 2. **수동으로 디버그 모드 활성화**:
185
+ ```bash
186
+ export SYNAPSE_DEBUG=true
187
+ synapse plugin run --path ./my-plugin --action test
188
+ ```
189
+
190
+ 2. **로그 확인**:
191
+ ```python
192
+ def start(self):
193
+ try:
194
+ self.run.log("Starting plugin execution")
195
+ # 여기에 코드 작성
196
+ self.run.log("Plugin completed successfully")
197
+ except Exception as e:
198
+ self.run.log(f"Error: {str(e)}", level="ERROR")
199
+ raise
200
+ ```
201
+
202
+ 3. **매개변수 검증**:
203
+ ```python
204
+ from pydantic import ValidationError
205
+
206
+ def start(self):
207
+ try:
208
+ # 매개변수 검증
209
+ params = self.params_model(**self.params)
210
+ except ValidationError as e:
211
+ self.run.log(f"Parameter validation failed: {e}")
212
+ raise
213
+ ```
214
+
215
+ ### 파일 처리 문제
216
+
217
+ **증상**: 플러그인에서 파일 작업이 실패합니다.
218
+
219
+ **일반적인 문제 & 해결방법**:
220
+
221
+ 1. **FileField가 다운로드되지 않음**:
222
+ ```python
223
+ # 파일 URL 형식 확인
224
+ class MyParams(BaseModel):
225
+ input_file: FileField # URL 형식 예상
226
+
227
+ def start(self):
228
+ file_path = self.params.input_file
229
+ if not os.path.exists(file_path):
230
+ raise FileNotFoundError(f"File not found: {file_path}")
231
+ ```
232
+
233
+ 2. **권한 오류**:
234
+ ```python
235
+ import tempfile
236
+ import shutil
237
+
238
+ def start(self):
239
+ # 임시 디렉토리 사용
240
+ with tempfile.TemporaryDirectory() as temp_dir:
241
+ output_path = os.path.join(temp_dir, "result.csv")
242
+ # output_path에서 처리 및 저장
243
+ ```
244
+
245
+ 3. **대용량 파일 처리**:
246
+ ```python
247
+ def start(self):
248
+ # 대용량 파일을 청크 단위로 처리
249
+ chunk_size = 1024 * 1024 # 1MB 청크
250
+ with open(self.params.input_file, 'rb') as f:
251
+ while True:
252
+ chunk = f.read(chunk_size)
253
+ if not chunk:
254
+ break
255
+ process_chunk(chunk)
256
+ ```
257
+
258
+ ## 분산 컴퓨팅 문제
259
+
260
+ ### 클러스터 연결
261
+
262
+ **증상**: 컴퓨팅 클러스터에 연결할 수 없습니다.
263
+
264
+ **해결방법**:
265
+
266
+ 1. **클러스터 상태 확인**:
267
+ ```bash
268
+ synapse cluster status
269
+ # 클러스터 정보가 표시되어야 함
270
+ ```
271
+
272
+ 2. **로컬 클러스터 시작**:
273
+ ```bash
274
+ synapse cluster start --dashboard-host=0.0.0.0
275
+ ```
276
+
277
+ 3. **원격 클러스터 연결**:
278
+ ```bash
279
+ export SYNAPSE_CLUSTER_ADDRESS="cluster://remote-cluster:10001"
280
+ synapse cluster status # 원격 클러스터에 연결되어야 함
281
+ ```
282
+
283
+ ### 메모리 문제
284
+
285
+ **증상**: 실행 중 메모리 부족 오류가 발생합니다.
286
+
287
+ **해결방법**:
288
+
289
+ 1. **메모리 할당 증가**:
290
+ ```bash
291
+ synapse cluster start --memory=2000000000 # 2GB
292
+ ```
293
+
294
+ 2. **코드에서 설정**:
295
+ ```python
296
+ from synapse_sdk.compute import init
297
+ init(memory=2000000000)
298
+ ```
299
+
300
+ 3. **데이터를 작은 청크로 처리**:
301
+ ```python
302
+ def process_chunk(data_chunk):
303
+ return process(data_chunk)
304
+
305
+ # 대용량 데이터를 청크로 분할
306
+ chunks = split_data(large_data)
307
+ results = [process_chunk(chunk) for chunk in chunks]
308
+ ```
309
+
310
+ ### 작업 실패
311
+
312
+ **증상**: 작업이 시작되지 않거나 완료되지 않습니다.
313
+
314
+ **해결방법**:
315
+
316
+ 1. **리소스 요구사항 확인**:
317
+ ```python
318
+ def my_task(resources={'cpus': 2, 'memory': '1GB'}):
319
+ pass
320
+ ```
321
+
322
+ 2. **런타임 환경 확인**:
323
+ ```yaml
324
+ # 플러그인 config.yaml에서
325
+ runtime_env:
326
+ pip:
327
+ packages: ["pandas", "numpy"]
328
+ ```
329
+
330
+ ## 개발 도구 문제
331
+
332
+ ### 개발 도구가 시작되지 않음
333
+
334
+ **증상**: `synapse --dev-tools` 시작이 실패합니다.
335
+
336
+ **해결방법**:
337
+
338
+ 1. **대시보드 의존성 설치**:
339
+ ```bash
340
+ pip install synapse-sdk[dashboard]
341
+ ```
342
+
343
+ 2. **포트 사용 가능성 확인**:
344
+ ```bash
345
+ # 포트 8080 사용 중인지 확인
346
+ lsof -i :8080
347
+
348
+ # 다른 포트 사용
349
+ synapse devtools --port 8081
350
+ ```
351
+
352
+ 3. **프론트엔드 수동 빌드**:
353
+ ```bash
354
+ cd synapse_sdk/devtools/web
355
+ npm install
356
+ npm run build
357
+ ```
358
+
359
+ ### 프론트엔드 빌드 오류
360
+
361
+ **증상**: 프론트엔드 에셋 빌드가 실패합니다.
362
+
363
+ **해결방법**:
364
+
365
+ 1. **Node.js 의존성 설치**:
366
+ ```bash
367
+ # Node.js 설치 (설치되지 않은 경우)
368
+ curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
369
+ sudo apt-get install -y nodejs
370
+
371
+ # 또는 nvm 사용
372
+ nvm install 18
373
+ nvm use 18
374
+ ```
375
+
376
+ 2. **npm 캐시 정리**:
377
+ ```bash
378
+ cd synapse_sdk/devtools/web
379
+ rm -rf node_modules package-lock.json
380
+ npm cache clean --force
381
+ npm install
382
+ ```
383
+
384
+ ## 성능 문제
385
+
386
+ ### 플러그인 실행 속도 저하
387
+
388
+ **증상**: 플러그인 실행 시간이 너무 오래 걸립니다.
389
+
390
+ **최적화 전략**:
391
+
392
+ 1. **코드 프로파일링**:
393
+ ```python
394
+ import time
395
+
396
+ def start(self):
397
+ start_time = time.time()
398
+ # 여기에 코드 작성
399
+ self.run.log(f"Execution took {time.time() - start_time:.2f}s")
400
+ ```
401
+
402
+ 2. **병렬 처리 사용**:
403
+ ```python
404
+ from concurrent.futures import ThreadPoolExecutor
405
+
406
+ def parallel_task(item):
407
+ return process_item(item)
408
+
409
+ def start(self):
410
+ # 병렬로 항목 처리
411
+ with ThreadPoolExecutor() as executor:
412
+ results = list(executor.map(parallel_task, items))
413
+ ```
414
+
415
+ 3. **데이터 로딩 최적화**:
416
+ ```python
417
+ # 모든 것을 한 번에 로딩하는 대신
418
+ data = pd.read_csv(large_file)
419
+
420
+ # 청크 로딩 사용
421
+ for chunk in pd.read_csv(large_file, chunksize=1000):
422
+ process_chunk(chunk)
423
+ ```
424
+
425
+ ### 메모리 사용량 문제
426
+
427
+ **증상**: 높은 메모리 사용량 또는 메모리 부족 오류가 발생합니다.
428
+
429
+ **해결방법**:
430
+
431
+ 1. **메모리 사용량 모니터링**:
432
+ ```python
433
+ import psutil
434
+
435
+ def start(self):
436
+ process = psutil.Process()
437
+ self.run.log(f"Memory usage: {process.memory_info().rss / 1024 / 1024:.1f} MB")
438
+ ```
439
+
440
+ 2. **리스트 대신 제너레이터 사용**:
441
+ ```python
442
+ # 대신
443
+ all_data = [process(item) for item in large_list]
444
+
445
+ # 제너레이터 사용
446
+ def process_items():
447
+ for item in large_list:
448
+ yield process(item)
449
+ ```
450
+
451
+ 3. **변수 명시적 정리**:
452
+ ```python
453
+ def start(self):
454
+ large_data = load_data()
455
+ result = process(large_data)
456
+ del large_data # 메모리 명시적 해제
457
+ return result
458
+ ```
459
+
460
+ ## 로깅 및 디버깅
461
+
462
+ ### 디버그 로깅 활성화
463
+
464
+ ```bash
465
+ export SYNAPSE_DEBUG=true
466
+ export SYNAPSE_LOG_LEVEL=DEBUG
467
+ ```
468
+
469
+ ### 커스텀 로깅
470
+
471
+ ```python
472
+ import logging
473
+
474
+ # 로깅 설정
475
+ logging.basicConfig(
476
+ level=logging.DEBUG,
477
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
478
+ )
479
+
480
+ logger = logging.getLogger(__name__)
481
+
482
+ def start(self):
483
+ logger.debug("Starting plugin execution")
484
+ # 여기에 코드 작성
485
+ ```
486
+
487
+ ### 디버깅 팁
488
+
489
+ 1. **print 문 사용** (로그에 표시됨):
490
+ ```python
491
+ def start(self):
492
+ print(f"Parameters: {self.params}")
493
+ print(f"Working directory: {os.getcwd()}")
494
+ ```
495
+
496
+ 2. **파일 존재 확인**:
497
+ ```python
498
+ def start(self):
499
+ file_path = self.params.input_file
500
+ print(f"File exists: {os.path.exists(file_path)}")
501
+ print(f"File size: {os.path.getsize(file_path)} bytes")
502
+ ```
503
+
504
+ 3. **데이터 타입 검증**:
505
+ ```python
506
+ def start(self):
507
+ print(f"Parameter types: {type(self.params.input_data)}")
508
+ print(f"Parameter value: {repr(self.params.input_data)}")
509
+ ```
510
+
511
+ ## 도움 받기
512
+
513
+ 문제를 해결할 수 없는 경우:
514
+
515
+ 1. **로그 철저히 확인**
516
+ 2. **GitHub issues 검색**: https://github.com/datamaker/synapse-sdk/issues
517
+ 3. **최소한의 재현 케이스** 생성
518
+ 4. **Discord 커뮤니티 참여**: https://discord.gg/synapse-sdk
519
+ 5. 자세한 오류 정보와 함께 **지원팀 문의**
@@ -0,0 +1,22 @@
1
+ {
2
+ "version.label": {
3
+ "message": "최신",
4
+ "description": "The label for version current"
5
+ },
6
+ "sidebar.tutorialSidebar.category.Features": {
7
+ "message": "기능",
8
+ "description": "The label for category Features in sidebar tutorialSidebar"
9
+ },
10
+ "sidebar.tutorialSidebar.category.API Reference": {
11
+ "message": "API 참조",
12
+ "description": "The label for category API Reference in sidebar tutorialSidebar"
13
+ },
14
+ "sidebar.tutorialSidebar.category.Clients": {
15
+ "message": "클라이언트",
16
+ "description": "The label for category Clients in sidebar tutorialSidebar"
17
+ },
18
+ "sidebar.tutorialSidebar.category.Utilities": {
19
+ "message": "유틸리티",
20
+ "description": "The label for category Utilities in sidebar tutorialSidebar"
21
+ }
22
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "link.title.Docs": {
3
+ "message": "문서",
4
+ "description": "The title of the footer links column with title=Docs in the footer"
5
+ },
6
+ "link.title.Community": {
7
+ "message": "커뮤니티",
8
+ "description": "The title of the footer links column with title=Community in the footer"
9
+ },
10
+ "link.title.More": {
11
+ "message": "더보기",
12
+ "description": "The title of the footer links column with title=More in the footer"
13
+ },
14
+ "link.item.label.Introduction": {
15
+ "message": "소개",
16
+ "description": "The label of footer link with label=Introduction linking to /docs/introduction"
17
+ },
18
+ "link.item.label.Quickstart": {
19
+ "message": "빠른 시작",
20
+ "description": "The label of footer link with label=Quickstart linking to /docs/quickstart"
21
+ },
22
+ "link.item.label.API Reference": {
23
+ "message": "API 참조",
24
+ "description": "The label of footer link with label=API Reference linking to /docs/api"
25
+ },
26
+ "link.item.label.GitHub": {
27
+ "message": "GitHub",
28
+ "description": "The label of footer link with label=GitHub linking to https://github.com/datamaker-kr/synapse-sdk"
29
+ },
30
+ "link.item.label.Blog": {
31
+ "message": "블로그",
32
+ "description": "The label of footer link with label=Blog linking to https://www.datamaker.io/blog"
33
+ },
34
+ "link.item.label.Datamaker": {
35
+ "message": "Datamaker",
36
+ "description": "The label of footer link with label=Datamaker linking to https://www.datamaker.io"
37
+ },
38
+ "copyright": {
39
+ "message": "Copyright © 2025 Datamaker. Docusaurus로 제작되었습니다.",
40
+ "description": "The footer copyright"
41
+ }
42
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "title": {
3
+ "message": "Synapse SDK",
4
+ "description": "The title in the navbar"
5
+ },
6
+ "logo.alt": {
7
+ "message": "Synapse SDK 로고",
8
+ "description": "The alt text of navbar logo"
9
+ },
10
+ "item.label.Documentation": {
11
+ "message": "문서",
12
+ "description": "Navbar item with label Documentation"
13
+ },
14
+ "item.label.GitHub": {
15
+ "message": "GitHub",
16
+ "description": "Navbar item with label GitHub"
17
+ }
18
+ }
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env python3
2
+ import sys
3
+ print(sys.argv[1])
@@ -44,4 +44,4 @@
44
44
  "engines": {
45
45
  "node": ">=18.0"
46
46
  }
47
- }
47
+ }
@@ -14,11 +14,20 @@ from synapse_sdk.plugins.categories.decorators import register_action
14
14
  from synapse_sdk.plugins.categories.export.enums import ExportStatus
15
15
  from synapse_sdk.plugins.enums import PluginCategory, RunMethod
16
16
  from synapse_sdk.plugins.models import Run
17
+ from synapse_sdk.shared.enums import Context
17
18
  from synapse_sdk.utils.pydantic.validators import non_blank
18
19
  from synapse_sdk.utils.storage import get_pathlib
19
20
 
20
21
 
21
22
  class ExportRun(Run):
23
+ class ExportEventLog(BaseModel):
24
+ """Export event log model."""
25
+
26
+ target_id: int
27
+ info: str | None = None
28
+ status: Context
29
+ created: str
30
+
22
31
  class DataFileLog(BaseModel):
23
32
  """Data file log model."""
24
33
 
@@ -35,6 +44,13 @@ class ExportRun(Run):
35
44
  failed: int
36
45
  success: int
37
46
 
47
+ LOG_MESSAGES = {
48
+ 'NULL_DATA_DETECTED': {
49
+ 'message': 'Data is null for export item',
50
+ 'level': Context.WARNING,
51
+ },
52
+ }
53
+
38
54
  def log_file(
39
55
  self, log_type: str, target_id: int, data_file_info: dict, status: ExportStatus, error: str | None = None
40
56
  ):
@@ -59,6 +75,35 @@ class ExportRun(Run):
59
75
  ).model_dump(),
60
76
  )
61
77
 
78
+ def log_export_event(self, code: str, target_id: int, *args, level: Context | None = None):
79
+ """Log export event using predefined code.
80
+
81
+ Args:
82
+ code (str): The log message code.
83
+ target_id (int): The ID of the export target.
84
+ *args: Arguments to format the message.
85
+ level (Context | None): Optional context level override.
86
+ """
87
+ if code not in self.LOG_MESSAGES:
88
+ now = datetime.now().isoformat()
89
+ self.log(
90
+ 'export_event',
91
+ self.ExportEventLog(
92
+ target_id=target_id, info=f'Unknown log code: {code}', status=Context.DANGER, created=now
93
+ ).model_dump(),
94
+ )
95
+ return
96
+
97
+ log_config = self.LOG_MESSAGES[code]
98
+ message = log_config['message'].format(*args) if args else log_config['message']
99
+ log_level = level or log_config['level'] or Context.INFO
100
+
101
+ now = datetime.now().isoformat()
102
+ self.log(
103
+ 'export_event',
104
+ self.ExportEventLog(info=message, status=log_level, target_id=target_id, created=now).model_dump(),
105
+ )
106
+
62
107
  def log_metrics(self, record: MetricsRecord, category: str):
63
108
  """Log export metrics.
64
109
 
@@ -67,7 +112,7 @@ class ExportRun(Run):
67
112
  category (str): The category of the metrics.
68
113
  """
69
114
  record = self.MetricsRecord.model_validate(record)
70
- self.set_metrics(value=record.dict(), category=category)
115
+ self.set_metrics(value=record.model_dump(), category=category)
71
116
 
72
117
  def export_log_json_file(
73
118
  self,
@@ -185,7 +230,7 @@ class GroundTruthExportTargetHandler(ExportTargetHandler):
185
230
  yield {
186
231
  'data': result['data'],
187
232
  'files': result['data_unit']['files'][files_key],
188
- 'id': result['ground_truth'],
233
+ 'id': result['id'],
189
234
  }
190
235
 
191
236
 
@@ -238,6 +283,8 @@ class ExportParams(BaseModel):
238
283
  path (str): The path to save the exported data.
239
284
  target (str): The target source to export data from. (ex. ground_truth, assignment, task)
240
285
  filter (dict): The filter criteria to apply.
286
+ extra_params (dict | None): Additional parameters for export customization.
287
+ Example: {"include_metadata": True, "compression": "gzip"}
241
288
  """
242
289
 
243
290
  name: Annotated[str, AfterValidator(non_blank)]
@@ -247,6 +294,7 @@ class ExportParams(BaseModel):
247
294
  path: str
248
295
  target: Literal['assignment', 'ground_truth', 'task']
249
296
  filter: dict
297
+ extra_params: dict | None = None
250
298
 
251
299
  @field_validator('storage')
252
300
  @staticmethod