synapse-sdk 1.0.0a55__tar.gz → 1.0.0a57__tar.gz

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 (165) hide show
  1. {synapse_sdk-1.0.0a55/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin → synapse_sdk-1.0.0a57}/.pre-commit-config.yaml +1 -1
  2. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/PKG-INFO +1 -1
  3. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/backend/__init__.py +2 -2
  4. synapse_sdk-1.0.0a55/synapse_sdk/clients/backend/dataset.py → synapse_sdk-1.0.0a57/synapse_sdk/clients/backend/data_collection.py +15 -15
  5. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/export/actions/export.py +18 -0
  6. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/export/templates/plugin/export.py +24 -2
  7. synapse_sdk-1.0.0a57/synapse_sdk/plugins/categories/upload/actions/task_pre_annotation.py +101 -0
  8. synapse_sdk-1.0.0a57/synapse_sdk/plugins/categories/upload/actions/upload.py +313 -0
  9. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/upload/templates/config.yaml +4 -3
  10. synapse_sdk-1.0.0a57/synapse_sdk/plugins/categories/upload/templates/plugin/task_pre_annotation.py +14 -0
  11. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk.egg-info/PKG-INFO +1 -1
  12. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk.egg-info/SOURCES.txt +3 -1
  13. synapse_sdk-1.0.0a55/synapse_sdk/plugins/categories/upload/actions/upload.py +0 -593
  14. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/.github/workflows/lint.yml +0 -0
  15. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/.github/workflows/pypi-publish.yml +0 -0
  16. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/.gitignore +0 -0
  17. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/LICENSE +0 -0
  18. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/README.md +0 -0
  19. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/locale/en/LC_MESSAGES/messages.mo +0 -0
  20. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/locale/en/LC_MESSAGES/messages.po +0 -0
  21. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/locale/ko/LC_MESSAGES/messages.mo +0 -0
  22. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/locale/ko/LC_MESSAGES/messages.po +0 -0
  23. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/pyproject.toml +0 -0
  24. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/requirements.test.txt +0 -0
  25. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/requirements.txt +0 -0
  26. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/setup.cfg +0 -0
  27. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/__init__.py +0 -0
  28. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/__init__.py +0 -0
  29. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/alias/__init__.py +0 -0
  30. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/alias/create.py +0 -0
  31. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/alias/dataclass.py +0 -0
  32. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/alias/default.py +0 -0
  33. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/alias/delete.py +0 -0
  34. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/alias/list.py +0 -0
  35. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/alias/read.py +0 -0
  36. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/alias/update.py +0 -0
  37. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/alias/utils.py +0 -0
  38. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/plugin/__init__.py +0 -0
  39. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/plugin/create.py +0 -0
  40. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/plugin/publish.py +0 -0
  41. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/cli/plugin/run.py +0 -0
  42. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/__init__.py +0 -0
  43. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/agent/__init__.py +0 -0
  44. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/agent/core.py +0 -0
  45. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/agent/ray.py +0 -0
  46. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/agent/service.py +0 -0
  47. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/backend/annotation.py +0 -0
  48. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/backend/core.py +0 -0
  49. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/backend/hitl.py +0 -0
  50. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/backend/integration.py +0 -0
  51. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/backend/ml.py +0 -0
  52. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/backend/models.py +0 -0
  53. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/base.py +0 -0
  54. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/exceptions.py +0 -0
  55. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/ray/__init__.py +0 -0
  56. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/ray/core.py +0 -0
  57. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/ray/serve.py +0 -0
  58. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/utils.py +0 -0
  59. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/validators/__init__.py +0 -0
  60. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/clients/validators/collections.py +0 -0
  61. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/i18n.py +0 -0
  62. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/loggers.py +0 -0
  63. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/__init__.py +0 -0
  64. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/__init__.py +0 -0
  65. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/base.py +0 -0
  66. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/data_validation/__init__.py +0 -0
  67. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/data_validation/actions/__init__.py +0 -0
  68. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/data_validation/actions/validation.py +0 -0
  69. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/data_validation/templates/config.yaml +0 -0
  70. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/data_validation/templates/plugin/__init__.py +0 -0
  71. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/data_validation/templates/plugin/validation.py +0 -0
  72. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/decorators.py +0 -0
  73. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/export/__init__.py +0 -0
  74. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/export/actions/__init__.py +0 -0
  75. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/export/enums.py +0 -0
  76. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/export/templates/config.yaml +0 -0
  77. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/export/templates/plugin/__init__.py +0 -0
  78. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/__init__.py +0 -0
  79. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/actions/__init__.py +0 -0
  80. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/actions/deployment.py +0 -0
  81. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/actions/gradio.py +0 -0
  82. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/actions/inference.py +0 -0
  83. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/actions/test.py +0 -0
  84. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/actions/train.py +0 -0
  85. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/actions/tune.py +0 -0
  86. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/base/__init__.py +0 -0
  87. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/base/inference.py +0 -0
  88. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/templates/config.yaml +0 -0
  89. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/templates/plugin/__init__.py +0 -0
  90. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/templates/plugin/inference.py +0 -0
  91. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/templates/plugin/test.py +0 -0
  92. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/neural_net/templates/plugin/train.py +0 -0
  93. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/post_annotation/__init__.py +0 -0
  94. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/post_annotation/actions/__init__.py +0 -0
  95. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/post_annotation/actions/post_annotation.py +0 -0
  96. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/post_annotation/templates/config.yaml +0 -0
  97. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/post_annotation/templates/plugin/__init__.py +0 -0
  98. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/post_annotation/templates/plugin/post_annotation.py +0 -0
  99. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/pre_annotation/__init__.py +0 -0
  100. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/pre_annotation/actions/__init__.py +0 -0
  101. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/pre_annotation/actions/pre_annotation.py +0 -0
  102. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/pre_annotation/templates/config.yaml +0 -0
  103. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/pre_annotation/templates/plugin/__init__.py +0 -0
  104. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/pre_annotation/templates/plugin/pre_annotation.py +0 -0
  105. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/registry.py +0 -0
  106. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/smart_tool/__init__.py +0 -0
  107. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/smart_tool/actions/__init__.py +0 -0
  108. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/smart_tool/actions/auto_label.py +0 -0
  109. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/smart_tool/templates/config.yaml +0 -0
  110. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/smart_tool/templates/plugin/__init__.py +0 -0
  111. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/smart_tool/templates/plugin/auto_label.py +0 -0
  112. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/templates.py +0 -0
  113. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/upload/__init__.py +0 -0
  114. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/upload/actions/__init__.py +0 -0
  115. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/upload/templates/plugin/__init__.py +0 -0
  116. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/categories/upload/templates/plugin/upload.py +0 -0
  117. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/enums.py +0 -0
  118. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/exceptions.py +0 -0
  119. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/models.py +0 -0
  120. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/templates/cookiecutter.json +0 -0
  121. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/templates/hooks/post_gen_project.py +0 -0
  122. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/templates/hooks/pre_prompt.py +0 -0
  123. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/.gitignore +0 -0
  124. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin}/.pre-commit-config.yaml +0 -0
  125. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/README.md +0 -0
  126. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/config.yaml +0 -0
  127. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/plugin/__init__.py +0 -0
  128. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/pyproject.toml +0 -0
  129. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/templates/synapse-{{cookiecutter.plugin_code}}-plugin/requirements.txt +0 -0
  130. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/upload.py +0 -0
  131. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/plugins/utils.py +0 -0
  132. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/shared/__init__.py +0 -0
  133. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/shared/enums.py +0 -0
  134. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/types.py +0 -0
  135. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/__init__.py +0 -0
  136. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/dataset.py +0 -0
  137. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/debug.py +0 -0
  138. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/file.py +0 -0
  139. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/http.py +0 -0
  140. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/module_loading.py +0 -0
  141. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/network.py +0 -0
  142. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/pydantic/__init__.py +0 -0
  143. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/pydantic/config.py +0 -0
  144. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/pydantic/errors.py +0 -0
  145. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/pydantic/validators.py +0 -0
  146. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/storage/__init__.py +0 -0
  147. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/storage/providers/__init__.py +0 -0
  148. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/storage/providers/gcp.py +0 -0
  149. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/storage/providers/s3.py +0 -0
  150. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/storage/providers/sftp.py +0 -0
  151. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/storage/registry.py +0 -0
  152. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk/utils/string.py +0 -0
  153. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk.egg-info/dependency_links.txt +0 -0
  154. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk.egg-info/entry_points.txt +0 -0
  155. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk.egg-info/requires.txt +0 -0
  156. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/synapse_sdk.egg-info/top_level.txt +0 -0
  157. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/tests/__init__.py +0 -0
  158. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/tests/clients/__init__.py +0 -0
  159. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/tests/clients/test_backend_models.py +0 -0
  160. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/tests/clients/test_base_client.py +0 -0
  161. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/tests/clients/test_collection_validators.py +0 -0
  162. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/tests/loggers/__init__.py +0 -0
  163. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/tests/loggers/test_base_logger.py +0 -0
  164. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/tests/utils/__init__,py +0 -0
  165. {synapse_sdk-1.0.0a55 → synapse_sdk-1.0.0a57}/tests/utils/test_debug.py +0 -0
@@ -1,6 +1,6 @@
1
1
  repos:
2
2
  - repo: https://github.com/astral-sh/ruff-pre-commit
3
- rev: v0.7.1
3
+ rev: v0.11.10
4
4
  hooks:
5
5
  - id: ruff
6
6
  args: [ --fix ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: synapse-sdk
3
- Version: 1.0.0a55
3
+ Version: 1.0.0a57
4
4
  Summary: synapse sdk
5
5
  Author-email: datamaker <developer@datamaker.io>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  from synapse_sdk.clients.backend.annotation import AnnotationClientMixin
2
2
  from synapse_sdk.clients.backend.core import CoreClientMixin
3
- from synapse_sdk.clients.backend.dataset import DatasetClientMixin
3
+ from synapse_sdk.clients.backend.data_collection import DataCollectionClientMixin
4
4
  from synapse_sdk.clients.backend.hitl import HITLClientMixin
5
5
  from synapse_sdk.clients.backend.integration import IntegrationClientMixin
6
6
  from synapse_sdk.clients.backend.ml import MLClientMixin
@@ -9,7 +9,7 @@ from synapse_sdk.clients.backend.ml import MLClientMixin
9
9
  class BackendClient(
10
10
  AnnotationClientMixin,
11
11
  CoreClientMixin,
12
- DatasetClientMixin,
12
+ DataCollectionClientMixin,
13
13
  IntegrationClientMixin,
14
14
  MLClientMixin,
15
15
  HITLClientMixin,
@@ -8,13 +8,13 @@ from synapse_sdk.clients.base import BaseClient
8
8
  from synapse_sdk.clients.utils import get_batched_list
9
9
 
10
10
 
11
- class DatasetClientMixin(BaseClient):
12
- def list_dataset(self):
11
+ class DataCollectionClientMixin(BaseClient):
12
+ def list_data_collection(self):
13
13
  path = 'data_collections/'
14
14
  return self._list(path)
15
15
 
16
- def get_dataset(self, data_collection_id):
17
- """Get dataset from synapse-backend.
16
+ def get_data_collection(self, data_collection_id):
17
+ """Get data_collection from synapse-backend.
18
18
 
19
19
  Args:
20
20
  data_collection_id: The data_collection id to get.
@@ -40,19 +40,19 @@ class DatasetClientMixin(BaseClient):
40
40
  path = 'data_units/'
41
41
  return self._post(path, data=data)
42
42
 
43
- def upload_dataset(
43
+ def upload_data_collection(
44
44
  self,
45
- dataset_id: int,
46
- dataset: Dict,
45
+ data_collection_id: int,
46
+ data_collection: Dict,
47
47
  project_id: Optional[int] = None,
48
48
  batch_size: int = 1000,
49
49
  process_pool: int = 10,
50
50
  ):
51
- """Upload dataset to synapse-backend.
51
+ """Upload data_collection to synapse-backend.
52
52
 
53
53
  Args:
54
- dataset_id: The dataset id to upload the data to.
55
- dataset: The dataset to upload.
54
+ data_collection_id: The data_collection id to upload the data to.
55
+ data_collection: The data_collection to upload.
56
56
  * structure:
57
57
  - files: The files to upload. (key: file name, value: file pathlib object)
58
58
  - meta: The meta data to upload.
@@ -60,14 +60,14 @@ class DatasetClientMixin(BaseClient):
60
60
  batch_size: The batch size to upload the data.
61
61
  process_pool: The process pool to upload the data.
62
62
  """
63
- # TODO validate dataset with schema
63
+ # TODO validate data_collection with schema
64
64
 
65
- params = [(data, dataset_id) for data in dataset]
65
+ params = [(data, data_collection_id) for data in data_collection]
66
66
 
67
67
  with Pool(processes=process_pool) as pool:
68
- dataset = pool.starmap(self.upload_data_file, tqdm(params))
68
+ data_collection = pool.starmap(self.upload_data_file, tqdm(params))
69
69
 
70
- batches = get_batched_list(dataset, batch_size)
70
+ batches = get_batched_list(data_collection, batch_size)
71
71
 
72
72
  for batch in tqdm(batches):
73
73
  data_units = self.create_data_units(batch)
@@ -90,7 +90,7 @@ class DatasetClientMixin(BaseClient):
90
90
  * structure:
91
91
  - files: The files to upload. (key: file name, value: file pathlib object)
92
92
  - meta: The meta data to upload.
93
- data_collection_id: The dataset id to upload the data to.
93
+ data_collection_id: The data_collection id to upload the data to.
94
94
 
95
95
  Returns:
96
96
  Dict: The result of the upload.
@@ -27,6 +27,13 @@ class ExportRun(Run):
27
27
  error: str | None = None
28
28
  created: str
29
29
 
30
+ class MetricsRecord(BaseModel):
31
+ """Metrics record model."""
32
+
33
+ stand_by: int
34
+ failed: int
35
+ success: int
36
+
30
37
  def log_file(
31
38
  self, log_type: str, target_id: int, data_file_info: dict, status: ExportStatus, error: str | None = None
32
39
  ):
@@ -51,6 +58,16 @@ class ExportRun(Run):
51
58
  ).model_dump(),
52
59
  )
53
60
 
61
+ def log_metrics(self, record: MetricsRecord, category: str):
62
+ """Log export metrics.
63
+
64
+ Args:
65
+ record (MetricsRecord): The metrics record to log.
66
+ category (str): The category of the metrics.
67
+ """
68
+ record = self.MetricsRecord.model_validate(record)
69
+ self.set_metrics(value=record.dict(), category=category)
70
+
54
71
  def export_log_json_file(
55
72
  self,
56
73
  target_id: int,
@@ -263,6 +280,7 @@ class ExportAction(Action):
263
280
  'proportion': 100,
264
281
  }
265
282
  }
283
+ metrics_categories = {'data_file', 'original_file'}
266
284
 
267
285
  def get_filtered_results(self, filters, handler):
268
286
  """Get filtered target results."""
@@ -42,6 +42,8 @@ def export(run, export_items, path_root, **params):
42
42
  origin_files_output_path.mkdir(parents=True, exist_ok=True)
43
43
 
44
44
  total = params['count']
45
+ original_file_metrics_record = run.MetricsRecord(stand_by=total, success=0, failed=0)
46
+ data_file_metrics_record = run.MetricsRecord(stand_by=total, success=0, failed=0)
45
47
  # progress init
46
48
  run.set_progress(0, total, category='dataset_conversion')
47
49
  for no, export_item in enumerate(export_items, start=1):
@@ -56,12 +58,30 @@ def export(run, export_items, path_root, **params):
56
58
  if save_original_file_flag:
57
59
  if no == 1:
58
60
  run.log_message('Saving original file.')
59
- save_original_file(run, final_data, origin_files_output_path, errors_original_file_list)
61
+ original_status = save_original_file(run, final_data, origin_files_output_path, errors_original_file_list)
62
+
63
+ original_file_metrics_record.stand_by -= 1
64
+ if original_status == ExportStatus.FAILED:
65
+ original_file_metrics_record.failed += 1
66
+ continue
67
+ else:
68
+ original_file_metrics_record.success += 1
69
+
70
+ run.log_metrics(record=original_file_metrics_record, category='original_file')
60
71
 
61
72
  # Extract data as JSON files
62
73
  if no == 1:
63
74
  run.log_message('Saving json file.')
64
- save_as_json(run, final_data, json_output_path, errors_json_file_list)
75
+ data_status = save_as_json(run, final_data, json_output_path, errors_json_file_list)
76
+
77
+ data_file_metrics_record.stand_by -= 1
78
+ if data_status == ExportStatus.FAILED:
79
+ data_file_metrics_record.failed += 1
80
+ continue
81
+ else:
82
+ data_file_metrics_record.success += 1
83
+
84
+ run.log_metrics(record=data_file_metrics_record, category='data_file')
65
85
 
66
86
  run.end_log()
67
87
 
@@ -126,6 +146,7 @@ def save_original_file(run, result, base_path, error_file_list):
126
146
  status = ExportStatus.FAILED
127
147
 
128
148
  run.export_log_original_file(result['id'], file_info, status, error_msg)
149
+ return status
129
150
 
130
151
 
131
152
  def save_as_json(run, result, base_path, error_file_list):
@@ -152,3 +173,4 @@ def save_as_json(run, result, base_path, error_file_list):
152
173
  status = ExportStatus.FAILED
153
174
 
154
175
  run.export_log_json_file(result['id'], file_info, status, error_msg)
176
+ return status
@@ -0,0 +1,101 @@
1
+ from enum import Enum
2
+ from typing import Annotated
3
+
4
+ from pydantic import AfterValidator, BaseModel, field_validator
5
+ from pydantic_core import PydanticCustomError
6
+
7
+ from synapse_sdk.clients.exceptions import ClientError
8
+ from synapse_sdk.plugins.categories.base import Action
9
+ from synapse_sdk.plugins.categories.decorators import register_action
10
+ from synapse_sdk.plugins.enums import PluginCategory, RunMethod
11
+ from synapse_sdk.plugins.models import Run
12
+ from synapse_sdk.utils.pydantic.validators import non_blank
13
+
14
+
15
+ class TaskDataAnnotationType(str, Enum):
16
+ FILE = 'file'
17
+ INFERENCE = 'inference'
18
+
19
+
20
+ class TaskPreAnnotationRun(Run):
21
+ pass
22
+
23
+
24
+ class TaskPreAnnotationParams(BaseModel):
25
+ """TaskPreAnnotation action parameters.
26
+
27
+ Args:
28
+ name (str): The name of the action.
29
+ description (str | None): The description of the action.
30
+ project (int): The project ID.
31
+ data_collection (int): The data collection ID.
32
+ task_data_annotation_type (TaskDataAnnotationType): The type of task data annotation.
33
+ """
34
+
35
+ name: Annotated[str, AfterValidator(non_blank)]
36
+ description: str | None
37
+ project: int
38
+ data_collection: int
39
+ task_data_annotation_type: TaskDataAnnotationType
40
+
41
+ @field_validator('data_collection', mode='before')
42
+ @classmethod
43
+ def check_data_collection_exists(cls, value: str, info) -> str:
44
+ """Validate synapse-backend collection exists."""
45
+ action = info.context['action']
46
+ client = action.client
47
+ try:
48
+ client.get_data_collection(value)
49
+ except ClientError:
50
+ raise PydanticCustomError('client_error', 'Error occurred while checking data collection exists.')
51
+ return value
52
+
53
+ @field_validator('project', mode='before')
54
+ @classmethod
55
+ def check_project_exists(cls, value: str, info) -> str:
56
+ """Validate synapse-backend project exists."""
57
+ if not value:
58
+ return value
59
+
60
+ action = info.context['action']
61
+ client = action.client
62
+ try:
63
+ client.get_project(value)
64
+ except ClientError:
65
+ raise PydanticCustomError('client_error', 'Error occurred while checking project exists.')
66
+ return value
67
+
68
+
69
+ @register_action
70
+ class TaskPreAnnotationAction(Action):
71
+ """TaskPreAnnotation action class.
72
+
73
+ * Annotate data to tasks.
74
+ """
75
+
76
+ name = 'task_pre_annotation'
77
+ category = PluginCategory.UPLOAD
78
+ method = RunMethod.JOB
79
+ run_class = TaskPreAnnotationRun
80
+ progress_categories = {
81
+ 'generate_tasks': {
82
+ 'proportion': 10,
83
+ },
84
+ 'annotate_task_data': {
85
+ 'proportion': 90,
86
+ },
87
+ }
88
+
89
+ def start(self):
90
+ """Start task_pre_annotation action.
91
+
92
+ * Generate tasks.
93
+ * Annotate data to tasks.
94
+ """
95
+ task_pre_annotation = self.get_task_pre_annotation()
96
+ task_pre_annotation.handle_annotate_data_from_files()
97
+ return {}
98
+
99
+ def get_task_pre_annotation(self):
100
+ """Get task pre annotation entrypoint."""
101
+ return self.entrypoint()
@@ -0,0 +1,313 @@
1
+ import json
2
+ from datetime import datetime
3
+ from enum import Enum
4
+ from typing import Annotated, Dict, List
5
+
6
+ from pydantic import AfterValidator, BaseModel, field_validator
7
+ from pydantic_core import PydanticCustomError
8
+
9
+ from synapse_sdk.clients.exceptions import ClientError
10
+ from synapse_sdk.clients.utils import get_batched_list
11
+ from synapse_sdk.i18n import gettext as _
12
+ from synapse_sdk.plugins.categories.base import Action
13
+ from synapse_sdk.plugins.categories.decorators import register_action
14
+ from synapse_sdk.plugins.enums import PluginCategory, RunMethod
15
+ from synapse_sdk.plugins.models import Run
16
+ from synapse_sdk.shared.enums import Context
17
+ from synapse_sdk.utils.pydantic.validators import non_blank
18
+ from synapse_sdk.utils.storage import get_pathlib
19
+
20
+
21
+ class UploadStatus(str, Enum):
22
+ SUCCESS = 'success'
23
+ FAILED = 'failed'
24
+
25
+
26
+ class UploadRun(Run):
27
+ class DataFileLog(BaseModel):
28
+ """Data file log model."""
29
+
30
+ data_file_info: str | None
31
+ status: UploadStatus
32
+ created: str
33
+
34
+ class DataUnitLog(BaseModel):
35
+ """Data unit log model."""
36
+
37
+ data_unit_id: int | None
38
+ status: UploadStatus
39
+ created: str
40
+
41
+ class TaskLog(BaseModel):
42
+ """Task log model."""
43
+
44
+ task_id: int | None
45
+ status: UploadStatus
46
+ created: str
47
+
48
+ def log_data_file(self, data_file_info: dict, status: UploadStatus):
49
+ """Upload data_file log.
50
+
51
+ Args:
52
+ data_file_info (dict): The json info of the data file.
53
+ checksum (str): The checksum of the data file.
54
+ status (DataUnitStatus): The status of the data unit.
55
+ """
56
+ now = datetime.now().isoformat()
57
+ self.log(
58
+ 'upload_data_file',
59
+ self.DataFileLog(data_file_info=json.dumps(data_file_info), status=status.value, created=now).model_dump(),
60
+ )
61
+
62
+ def log_data_unit(self, data_unit_id: int, status: UploadStatus):
63
+ """Upload data_unit log.
64
+
65
+ Args:
66
+ data_unit_id (int): The ID of the data unit.
67
+ status (DataUnitStatus): The status of the data unit.
68
+ """
69
+ now = datetime.now().isoformat()
70
+ self.log(
71
+ 'upload_data_unit',
72
+ self.DataUnitLog(data_unit_id=data_unit_id, status=status.value, created=now).model_dump(),
73
+ )
74
+
75
+ def log_task(self, task_id: int, status: UploadStatus):
76
+ """Upload task log.
77
+
78
+ Args:
79
+ task_id (int): The ID of the task.
80
+ status (UploadStatus): The status of the task.
81
+ """
82
+ now = datetime.now().isoformat()
83
+ self.log('upload_task', self.TaskLog(task_id=task_id, status=status.value, created=now).model_dump())
84
+
85
+
86
+ class UploadParams(BaseModel):
87
+ """Upload action parameters.
88
+
89
+ Args:
90
+ name (str): The name of the action.
91
+ description (str | None): The description of the action.
92
+ checkpoint (int | None): The checkpoint of the action.
93
+ path (str): The path of the action.
94
+ storage (int): The storage of the action.
95
+ collection (int): The collection of the action.
96
+ project (int | None): The project of the action.
97
+ is_generate_tasks (bool): The flag to generate tasks.
98
+ is_generate_ground_truths (bool): The flag to generate ground truths
99
+ """
100
+
101
+ name: Annotated[str, AfterValidator(non_blank)]
102
+ description: str | None
103
+ path: str
104
+ storage: int
105
+ collection: int
106
+ project: int | None
107
+
108
+ @field_validator('storage', mode='before')
109
+ @classmethod
110
+ def check_storage_exists(cls, value: str, info) -> str:
111
+ """Validate synapse-backend storage exists.
112
+
113
+ TODO: Need to define validation method naming convention.
114
+ TODO: Need to make validation method reusable.
115
+ """
116
+ action = info.context['action']
117
+ client = action.client
118
+ try:
119
+ client.get_storage(value)
120
+ except ClientError:
121
+ raise PydanticCustomError('client_error', _('Error occurred while checking storage exists.'))
122
+ return value
123
+
124
+ @field_validator('collection', mode='before')
125
+ @classmethod
126
+ def check_collection_exists(cls, value: str, info) -> str:
127
+ """Validate synapse-backend collection exists."""
128
+ action = info.context['action']
129
+ client = action.client
130
+ try:
131
+ client.get_data_collection(value)
132
+ except ClientError:
133
+ raise PydanticCustomError('client_error', _('Error occurred while checking collection exists.'))
134
+ return value
135
+
136
+ @field_validator('project', mode='before')
137
+ @classmethod
138
+ def check_project_exists(cls, value: str, info) -> str:
139
+ """Validate synapse-backend project exists."""
140
+ if not value:
141
+ return value
142
+
143
+ action = info.context['action']
144
+ client = action.client
145
+ try:
146
+ client.get_project(value)
147
+ except ClientError:
148
+ raise PydanticCustomError('client_error', _('Error occurred while checking project exists.'))
149
+ return value
150
+
151
+
152
+ @register_action
153
+ class UploadAction(Action):
154
+ """Upload action class.
155
+
156
+ Attrs:
157
+ name (str): The name of the action.
158
+ category (PluginCategory): The category of the action.
159
+ method (RunMethod): The method to run of the action.
160
+
161
+ Progress Categories:
162
+ analyze_collection: The progress category for the analyze collection process.
163
+ data_file_upload: The progress category for the upload process.
164
+ generate_data_units: The progress category for the generate data units process.
165
+ """
166
+
167
+ name = 'upload'
168
+ category = PluginCategory.UPLOAD
169
+ method = RunMethod.JOB
170
+ run_class = UploadRun
171
+ progress_categories = {
172
+ 'analyze_collection': {
173
+ 'proportion': 10,
174
+ },
175
+ 'upload_data_files': {
176
+ 'proportion': 50,
177
+ },
178
+ 'generate_data_units': {
179
+ 'proportion': 40,
180
+ },
181
+ }
182
+
183
+ def get_uploader(self, path, file_specification, organized_files):
184
+ """Get uploader from entrypoint."""
185
+ return self.entrypoint(self.run, path, file_specification, organized_files)
186
+
187
+ def start(self) -> Dict:
188
+ """Start upload process.
189
+
190
+ Returns:
191
+ Dict: The result of the upload process.
192
+ """
193
+ # Setup path object with path and storage.
194
+ storage = self.client.get_storage(self.params['storage'])
195
+ pathlib_cwd = get_pathlib(storage, self.params['path'])
196
+
197
+ # Analyze Collection file specifications to determine the data structure for upload.
198
+ file_specification_template = self._analyze_collection()
199
+ organized_files = self._organize_files(pathlib_cwd, file_specification_template)
200
+
201
+ # Initialize uploader.
202
+ uploader = self.get_uploader(pathlib_cwd, file_specification_template, organized_files)
203
+
204
+ # Setup result dict.
205
+ result = {}
206
+
207
+ # Get organized files from the uploader (plugin developer's custom implementation)
208
+ # or use the default organization method if uploader doesn't provide valid files
209
+ organized_files = uploader.handle_upload_files()
210
+
211
+ # Validate the organized files
212
+ if not self._validate_organized_files(organized_files, file_specification_template):
213
+ self.run.log_message('Validation failed.', context=Context.ERROR.value)
214
+ self.run.end_log()
215
+ return result
216
+
217
+ # Upload files to synapse-backend.
218
+ organized_files_count = len(organized_files)
219
+ if not organized_files_count:
220
+ self.run.log_message('Files not found on the path.', context=Context.WARNING.value)
221
+ self.run.end_log()
222
+ return result
223
+ uploaded_files = self._upload_files(organized_files, organized_files_count)
224
+ result['uploaded_files_count'] = len(uploaded_files)
225
+
226
+ # Generate data units for the uploaded data.
227
+ upload_result_count = len(uploaded_files)
228
+ if not upload_result_count:
229
+ self.run.log_message('No files were uploaded.', context=Context.WARNING.value)
230
+ self.run.end_log()
231
+ return result
232
+ generated_data_units = self._generate_data_units(uploaded_files, upload_result_count)
233
+ result['generated_data_units_count'] = len(generated_data_units)
234
+
235
+ self.run.end_log()
236
+ return result
237
+
238
+ def _analyze_collection(self) -> Dict:
239
+ """Analyze Synapse Collection Specifications.
240
+
241
+ Returns:
242
+ Dict: The file specifications of the collection.
243
+ """
244
+
245
+ # Initialize progress
246
+ self.run.set_progress(0, 1, category='analyze_collection')
247
+
248
+ client = self.run.client
249
+ collection_id = self.params['data_collection']
250
+ collection = client.get_data_collection(collection_id)
251
+
252
+ # Finish progress
253
+ self.run.set_progress(1, 1, category='analyze_collection')
254
+
255
+ return collection['file_specifications']
256
+
257
+ def _upload_files(self, organized_files, organized_files_count: int) -> List:
258
+ """Upload files to synapse-backend.
259
+
260
+ Returns:
261
+ Dict: The result of the upload.
262
+ """
263
+ # Initialize progress
264
+ self.run.set_progress(0, organized_files_count, category='upload_data_files')
265
+ self.run.log_message('Uploading data files...')
266
+
267
+ client = self.run.client
268
+ collection_id = self.params['data_collection']
269
+ upload_result = []
270
+ organized_files_count = len(organized_files)
271
+ current_progress = 0
272
+ for organized_file in organized_files:
273
+ uploaded_data_file = client.upload_data_file(organized_file, collection_id)
274
+ self.run.log_data_file(organized_file, UploadStatus.SUCCESS)
275
+ upload_result.append(uploaded_data_file)
276
+ self.run.set_progress(current_progress, organized_files_count, category='upload_data_files')
277
+ current_progress += 1
278
+
279
+ # Finish progress
280
+ self.run.set_progress(organized_files_count, organized_files_count, category='upload_data_files')
281
+ self.run.log_message('Upload data files completed.')
282
+
283
+ return upload_result
284
+
285
+ def _generate_data_units(self, uploaded_files: List, upload_result_count: int) -> List:
286
+ """Generate data units for the uploaded data.
287
+
288
+ TODO: make batch size configurable.
289
+
290
+ Returns:
291
+ Dict: The result of the generate data units process.
292
+ """
293
+ # Initialize progress
294
+ self.run.set_progress(0, upload_result_count, category='generate_data_units')
295
+
296
+ client = self.run.client
297
+
298
+ generated_data_units = []
299
+ current_progress = 0
300
+ batches = get_batched_list(uploaded_files, 100)
301
+ batches_count = len(batches)
302
+ for batch in batches:
303
+ created_data_units = client.create_data_units(batch)
304
+ generated_data_units.append(created_data_units)
305
+ self.run.set_progress(current_progress, batches_count, category='generate_data_units')
306
+ current_progress += 1
307
+ for created_data_unit in created_data_units:
308
+ self.run.log_data_unit(created_data_unit['id'], UploadStatus.SUCCESS)
309
+
310
+ # Finish progress
311
+ self.run.set_progress(upload_result_count, upload_result_count, category='generate_data_units')
312
+
313
+ return sum(generated_data_units, [])
@@ -1,9 +1,10 @@
1
1
  actions:
2
2
  upload:
3
3
  entrypoint: plugin.upload.Uploader
4
- options:
5
- allow_generate_tasks: false # Allow the plugin to generate tasks for the uploaded data
6
- allow_generate_ground_truths: false # Allow the plugin to generate ground truths for the uploaded data
7
4
  supported_data_type: image # A primary data type of synapse backend collection. (e.g. 'image', 'text', 'video', 'pcd', 'audio')
8
5
  ui_schema: |
9
6
  Dumped FormKit Schema for upload plugin custom options
7
+ task_pre_annotation:
8
+ entrypoint: plugin.upload.TaskPreAnnotation
9
+ ui_schema: |
10
+ Dumped FormKit Schema for upload plugin custom options
@@ -0,0 +1,14 @@
1
+ class TaskPreAnnotation:
2
+ def __init__(self, run, *args, **kwargs):
3
+ """Initialize the plugin task pre annotation action class.
4
+
5
+ Args:
6
+ run: Plugin run object.
7
+ """
8
+ self.run = run
9
+
10
+ def handle_annotate_data_from_files(self):
11
+ pass
12
+
13
+ def handle_annotate_data_with_inference(self):
14
+ pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: synapse-sdk
3
- Version: 1.0.0a55
3
+ Version: 1.0.0a57
4
4
  Summary: synapse sdk
5
5
  Author-email: datamaker <developer@datamaker.io>
6
6
  License: MIT
@@ -48,7 +48,7 @@ synapse_sdk/clients/agent/service.py
48
48
  synapse_sdk/clients/backend/__init__.py
49
49
  synapse_sdk/clients/backend/annotation.py
50
50
  synapse_sdk/clients/backend/core.py
51
- synapse_sdk/clients/backend/dataset.py
51
+ synapse_sdk/clients/backend/data_collection.py
52
52
  synapse_sdk/clients/backend/hitl.py
53
53
  synapse_sdk/clients/backend/integration.py
54
54
  synapse_sdk/clients/backend/ml.py
@@ -117,9 +117,11 @@ synapse_sdk/plugins/categories/smart_tool/templates/plugin/__init__.py
117
117
  synapse_sdk/plugins/categories/smart_tool/templates/plugin/auto_label.py
118
118
  synapse_sdk/plugins/categories/upload/__init__.py
119
119
  synapse_sdk/plugins/categories/upload/actions/__init__.py
120
+ synapse_sdk/plugins/categories/upload/actions/task_pre_annotation.py
120
121
  synapse_sdk/plugins/categories/upload/actions/upload.py
121
122
  synapse_sdk/plugins/categories/upload/templates/config.yaml
122
123
  synapse_sdk/plugins/categories/upload/templates/plugin/__init__.py
124
+ synapse_sdk/plugins/categories/upload/templates/plugin/task_pre_annotation.py
123
125
  synapse_sdk/plugins/categories/upload/templates/plugin/upload.py
124
126
  synapse_sdk/plugins/templates/cookiecutter.json
125
127
  synapse_sdk/plugins/templates/hooks/post_gen_project.py