model-compose 0.4.8__tar.gz → 0.4.10__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.
Files changed (361) hide show
  1. {model_compose-0.4.8/src/model_compose.egg-info → model_compose-0.4.10}/PKG-INFO +22 -30
  2. {model_compose-0.4.8 → model_compose-0.4.10}/README.md +21 -29
  3. {model_compose-0.4.8 → model_compose-0.4.10}/pyproject.toml +1 -1
  4. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/cli/compose.py +27 -21
  5. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/context.py +2 -1
  6. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/__init__.py +1 -0
  7. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/datasets/datasets.py +25 -0
  8. model_compose-0.4.10/src/mindor/core/component/services/datasets/utils.py +12 -0
  9. model_compose-0.4.10/src/mindor/core/component/services/image_processor.py +210 -0
  10. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/base/huggingface.py +96 -20
  11. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/chat_completion/huggingface.py +12 -2
  12. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/face_embedding/common.py +1 -1
  13. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/face_embedding/insightface.py +42 -24
  14. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_to_text/huggingface.py +2 -2
  15. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/text_generation/huggingface.py +7 -4
  16. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/text_splitter.py +0 -1
  17. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/base.py +14 -1
  18. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/services/http_server.py +20 -4
  19. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/listener/services/__init__.py +1 -0
  20. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/listener/services/http_callback.py +10 -12
  21. model_compose-0.4.10/src/mindor/core/listener/services/http_trigger.py +129 -0
  22. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/renderers.py +9 -3
  23. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/action.py +1 -0
  24. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/__init__.py +1 -0
  25. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/datasets/common.py +1 -0
  26. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/datasets/datasets.py +9 -1
  27. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/datasets/providers/common.py +2 -2
  28. model_compose-0.4.10/src/mindor/dsl/schema/action/impl/image_processor.py +91 -0
  29. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/chat_completion.py +14 -1
  30. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/common.py +1 -1
  31. model_compose-0.4.10/src/mindor/dsl/schema/action/impl/model_trainer/impl/common.py +85 -0
  32. model_compose-0.4.10/src/mindor/dsl/schema/action/impl/model_trainer/impl/sft.py +25 -0
  33. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/text_splitter.py +0 -1
  34. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/component.py +2 -1
  35. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/__init__.py +1 -0
  36. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/common.py +10 -3
  37. model_compose-0.4.10/src/mindor/dsl/schema/component/impl/image_processor.py +17 -0
  38. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/common.py +41 -0
  39. model_compose-0.4.10/src/mindor/dsl/schema/component/impl/model_trainer/impl/common.py +27 -0
  40. model_compose-0.4.10/src/mindor/dsl/schema/component/impl/types.py +15 -0
  41. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/impl/common.py +1 -1
  42. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/listener/impl/__init__.py +1 -0
  43. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/listener/impl/http_callback.py +1 -1
  44. model_compose-0.4.10/src/mindor/dsl/schema/listener/impl/http_trigger.py +27 -0
  45. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/listener/impl/types.py +1 -0
  46. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/listener/listener.py +2 -1
  47. model_compose-0.4.10/src/mindor/dsl/utils/path.py +23 -0
  48. {model_compose-0.4.8 → model_compose-0.4.10/src/model_compose.egg-info}/PKG-INFO +22 -30
  49. {model_compose-0.4.8 → model_compose-0.4.10}/src/model_compose.egg-info/SOURCES.txt +7 -0
  50. model_compose-0.4.8/src/mindor/dsl/schema/action/impl/model_trainer/impl/common.py +0 -22
  51. model_compose-0.4.8/src/mindor/dsl/schema/action/impl/model_trainer/impl/sft.py +0 -7
  52. model_compose-0.4.8/src/mindor/dsl/schema/component/impl/model_trainer/impl/common.py +0 -18
  53. model_compose-0.4.8/src/mindor/dsl/schema/component/impl/types.py +0 -14
  54. {model_compose-0.4.8 → model_compose-0.4.10}/LICENSE +0 -0
  55. {model_compose-0.4.8 → model_compose-0.4.10}/setup.cfg +0 -0
  56. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/__init__.py +0 -0
  57. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/cli/__init__.py +0 -0
  58. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/__init__.py +0 -0
  59. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/__init__.py +0 -0
  60. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/base.py +0 -0
  61. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/component.py +0 -0
  62. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/datasets/__init__.py +0 -0
  63. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/datasets/providers/__init__.py +0 -0
  64. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/datasets/providers/common.py +0 -0
  65. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/datasets/providers/huggingface.py +0 -0
  66. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/datasets/providers/local.py +0 -0
  67. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/http_client.py +0 -0
  68. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/http_server.py +0 -0
  69. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/mcp_client.py +0 -0
  70. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/mcp_server.py +0 -0
  71. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/__init__.py +0 -0
  72. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/base/__init__.py +0 -0
  73. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/base/common.py +0 -0
  74. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/base/huggingface_hub.py +0 -0
  75. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/base/unsloth.py +0 -0
  76. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/model.py +0 -0
  77. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/__init__.py +0 -0
  78. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/chat_completion/__init__.py +0 -0
  79. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/face_embedding/__init__.py +0 -0
  80. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/face_embedding/custom.py +0 -0
  81. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_generation/__init__.py +0 -0
  82. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_generation/common.py +0 -0
  83. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_generation/custom.py +0 -0
  84. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_generation/flux.py +0 -0
  85. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_generation/hunyuan_image.py +0 -0
  86. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_generation/sdxl.py +0 -0
  87. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_to_text/__init__.py +0 -0
  88. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_upscale/__init__.py +0 -0
  89. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_upscale/common.py +0 -0
  90. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_upscale/custom.py +0 -0
  91. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_upscale/esrgan.py +0 -0
  92. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_upscale/ldsr.py +0 -0
  93. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_upscale/real_esrgan.py +0 -0
  94. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/image_upscale/swinir.py +0 -0
  95. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/text_classification/__init__.py +0 -0
  96. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/text_classification/huggingface.py +0 -0
  97. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/text_embedding/__init__.py +0 -0
  98. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/text_embedding/huggingface.py +0 -0
  99. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/model/tasks/text_generation/__init__.py +0 -0
  100. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/shell.py +0 -0
  101. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/vector_store/__init__.py +0 -0
  102. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/vector_store/base.py +0 -0
  103. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/vector_store/drivers/__init__.py +0 -0
  104. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/vector_store/drivers/chroma.py +0 -0
  105. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/vector_store/drivers/milvus.py +0 -0
  106. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/vector_store/vector_store.py +0 -0
  107. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/component/services/workflow.py +0 -0
  108. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/compose/__init__.py +0 -0
  109. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/compose/compose.py +0 -0
  110. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/compose/manager.py +0 -0
  111. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/__init__.py +0 -0
  112. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/controller.py +0 -0
  113. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runner/__init__.py +0 -0
  114. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runner/client.py +0 -0
  115. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runner/http_client.py +0 -0
  116. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runner/mcp_client.py +0 -0
  117. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runner/runner.py +0 -0
  118. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runtime/__init__.py +0 -0
  119. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runtime/docker/__init__.py +0 -0
  120. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runtime/docker/context/Dockerfile +0 -0
  121. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runtime/docker/docker.py +0 -0
  122. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runtime/native/__init__.py +0 -0
  123. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runtime/native/native.py +0 -0
  124. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/runtime/specs.py +0 -0
  125. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/services/__init__.py +0 -0
  126. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/services/mcp_server.py +0 -0
  127. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/webui/__init__.py +0 -0
  128. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/webui/gradio.py +0 -0
  129. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/controller/webui/webui.py +0 -0
  130. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/foundation/__init__.py +0 -0
  131. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/foundation/async_service.py +0 -0
  132. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/__init__.py +0 -0
  133. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/base.py +0 -0
  134. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/gateway.py +0 -0
  135. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/services/__init__.py +0 -0
  136. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/services/http_tunnel/__init__.py +0 -0
  137. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/services/http_tunnel/base.py +0 -0
  138. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/services/http_tunnel/drivers/__init__.py +0 -0
  139. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/services/http_tunnel/drivers/cloudflare.py +0 -0
  140. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/services/http_tunnel/drivers/ngrok.py +0 -0
  141. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/services/http_tunnel/http_tunnel.py +0 -0
  142. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/gateway/services/ssh_tunnel.py +0 -0
  143. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/listener/__init__.py +0 -0
  144. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/listener/base.py +0 -0
  145. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/listener/listener.py +0 -0
  146. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/logger/__init__.py +0 -0
  147. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/logger/base.py +0 -0
  148. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/logger/logger.py +0 -0
  149. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/logger/logging.py +0 -0
  150. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/logger/services/__init__.py +0 -0
  151. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/logger/services/console.py +0 -0
  152. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/logger/services/file.py +0 -0
  153. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/runtime/__init__.py +0 -0
  154. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/runtime/docker/__init__.py +0 -0
  155. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/runtime/docker/docker.py +0 -0
  156. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/runtime/env.py +0 -0
  157. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/__init__.py +0 -0
  158. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/caching.py +0 -0
  159. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/http_client.py +0 -0
  160. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/http_request.py +0 -0
  161. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/http_response.py +0 -0
  162. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/http_status.py +0 -0
  163. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/image.py +0 -0
  164. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/mcp_client.py +0 -0
  165. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/package.py +0 -0
  166. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/resolvers.py +0 -0
  167. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/shell.py +0 -0
  168. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/ssh_client.py +0 -0
  169. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/streamer.py +0 -0
  170. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/streaming.py +0 -0
  171. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/time.py +0 -0
  172. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/websocket_client.py +0 -0
  173. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/utils/work_queue.py +0 -0
  174. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/__init__.py +0 -0
  175. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/context.py +0 -0
  176. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/__init__.py +0 -0
  177. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/base.py +0 -0
  178. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/impl/__init__.py +0 -0
  179. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/impl/action.py +0 -0
  180. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/impl/delay.py +0 -0
  181. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/impl/filter.py +0 -0
  182. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/impl/if_.py +0 -0
  183. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/impl/random_router.py +0 -0
  184. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/impl/switch.py +0 -0
  185. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/job/job.py +0 -0
  186. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/schema.py +0 -0
  187. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/core/workflow/workflow.py +0 -0
  188. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/__init__.py +0 -0
  189. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/loader.py +0 -0
  190. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/__init__.py +0 -0
  191. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/__init__.py +0 -0
  192. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/common.py +0 -0
  193. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/datasets/__init__.py +0 -0
  194. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/datasets/providers/__init__.py +0 -0
  195. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/datasets/providers/huggingface.py +0 -0
  196. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/datasets/providers/local.py +0 -0
  197. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/http_client.py +0 -0
  198. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/http_server.py +0 -0
  199. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/mcp_client.py +0 -0
  200. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/mcp_server.py +0 -0
  201. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/__init__.py +0 -0
  202. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/__init__.py +0 -0
  203. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/face_embedding/__init__.py +0 -0
  204. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/face_embedding/face_embedding.py +0 -0
  205. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/face_embedding/impl/__init__.py +0 -0
  206. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/face_embedding/impl/common.py +0 -0
  207. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/face_embedding/impl/dlib.py +0 -0
  208. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/face_embedding/impl/facenet.py +0 -0
  209. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/face_embedding/impl/insightface.py +0 -0
  210. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_generation/__init__.py +0 -0
  211. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_generation/image_generation.py +0 -0
  212. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_generation/impl/__init__.py +0 -0
  213. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_generation/impl/common.py +0 -0
  214. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_generation/impl/flux.py +0 -0
  215. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_generation/impl/hunyuan_image.py +0 -0
  216. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_generation/impl/sdxl.py +0 -0
  217. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_to_text.py +0 -0
  218. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_upscale/__init__.py +0 -0
  219. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_upscale/image_upscale.py +0 -0
  220. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_upscale/impl/__init__.py +0 -0
  221. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_upscale/impl/common.py +0 -0
  222. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_upscale/impl/esrgan.py +0 -0
  223. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_upscale/impl/ldsr.py +0 -0
  224. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_upscale/impl/real_esrgan.py +0 -0
  225. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/image_upscale/impl/swinir.py +0 -0
  226. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/text_classification.py +0 -0
  227. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/text_embedding.py +0 -0
  228. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/impl/text_generation.py +0 -0
  229. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model/model.py +0 -0
  230. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model_trainer/__init__.py +0 -0
  231. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model_trainer/impl/__init__.py +0 -0
  232. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model_trainer/impl/classification.py +0 -0
  233. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/model_trainer/model_trainer.py +0 -0
  234. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/shell.py +0 -0
  235. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/vector_store/__init__.py +0 -0
  236. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/vector_store/impl/__init__.py +0 -0
  237. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/vector_store/impl/chroma.py +0 -0
  238. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/vector_store/impl/common.py +0 -0
  239. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/vector_store/impl/faiss.py +0 -0
  240. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/vector_store/impl/milvus.py +0 -0
  241. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/vector_store/impl/qdrant.py +0 -0
  242. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/vector_store/vector_store.py +0 -0
  243. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/action/impl/workflow.py +0 -0
  244. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/__init__.py +0 -0
  245. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/datasets/__init__.py +0 -0
  246. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/datasets/datasets.py +0 -0
  247. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/http_client.py +0 -0
  248. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/http_server.py +0 -0
  249. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/mcp_client.py +0 -0
  250. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/mcp_server.py +0 -0
  251. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/__init__.py +0 -0
  252. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/__init__.py +0 -0
  253. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/chat_completion.py +0 -0
  254. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/face_embedding/__init__.py +0 -0
  255. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/face_embedding/face_embedding.py +0 -0
  256. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/face_embedding/impl/__init__.py +0 -0
  257. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/face_embedding/impl/common.py +0 -0
  258. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/face_embedding/impl/dlib.py +0 -0
  259. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/face_embedding/impl/facenet.py +0 -0
  260. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/face_embedding/impl/insightface.py +0 -0
  261. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_generation/__init__.py +0 -0
  262. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_generation/image_generation.py +0 -0
  263. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_generation/impl/__init__.py +0 -0
  264. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_generation/impl/common.py +0 -0
  265. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_generation/impl/flux.py +0 -0
  266. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_generation/impl/hunyuan_image.py +0 -0
  267. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_generation/impl/sdxl.py +0 -0
  268. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_to_text.py +0 -0
  269. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_upscale/__init__.py +0 -0
  270. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_upscale/image_upscale.py +0 -0
  271. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_upscale/impl/__init__.py +0 -0
  272. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_upscale/impl/common.py +0 -0
  273. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_upscale/impl/esrgan.py +0 -0
  274. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_upscale/impl/ldsr.py +0 -0
  275. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_upscale/impl/real_esrgan.py +0 -0
  276. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/image_upscale/impl/swinir.py +0 -0
  277. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/text_classification.py +0 -0
  278. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/text_embedding.py +0 -0
  279. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/impl/text_generation.py +0 -0
  280. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model/model.py +0 -0
  281. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model_trainer/__init__.py +0 -0
  282. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model_trainer/impl/__init__.py +0 -0
  283. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model_trainer/impl/classification.py +0 -0
  284. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model_trainer/impl/sft.py +0 -0
  285. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/model_trainer/model_trainer.py +0 -0
  286. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/shell.py +0 -0
  287. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/text_splitter.py +0 -0
  288. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/vector_store/__init__.py +0 -0
  289. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/vector_store/impl/__init__.py +0 -0
  290. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/vector_store/impl/chroma.py +0 -0
  291. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/vector_store/impl/common.py +0 -0
  292. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/vector_store/impl/faiss.py +0 -0
  293. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/vector_store/impl/milvus.py +0 -0
  294. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/vector_store/impl/qdrant.py +0 -0
  295. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/vector_store/vector_store.py +0 -0
  296. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/component/impl/workflow.py +0 -0
  297. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/compose.py +0 -0
  298. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/__init__.py +0 -0
  299. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/controller.py +0 -0
  300. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/impl/__init__.py +0 -0
  301. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/impl/http_server.py +0 -0
  302. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/impl/mcp_server.py +0 -0
  303. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/impl/types.py +0 -0
  304. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/webui/__init__.py +0 -0
  305. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/webui/impl/__init__.py +0 -0
  306. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/webui/impl/common.py +0 -0
  307. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/webui/impl/dynamic.py +0 -0
  308. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/webui/impl/gradio.py +0 -0
  309. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/webui/impl/static.py +0 -0
  310. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/controller/webui/webui.py +0 -0
  311. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/__init__.py +0 -0
  312. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/gateway.py +0 -0
  313. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/__init__.py +0 -0
  314. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/common.py +0 -0
  315. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/http_tunnel/__init__.py +0 -0
  316. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/http_tunnel/http_tunnel.py +0 -0
  317. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/http_tunnel/impl/__init__.py +0 -0
  318. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/http_tunnel/impl/cloudflare.py +0 -0
  319. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/http_tunnel/impl/common.py +0 -0
  320. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/http_tunnel/impl/ngrok.py +0 -0
  321. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/ssh_tunnel.py +0 -0
  322. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/gateway/impl/types.py +0 -0
  323. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/__init__.py +0 -0
  324. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/impl/__init__.py +0 -0
  325. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/impl/action.py +0 -0
  326. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/impl/common.py +0 -0
  327. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/impl/delay.py +0 -0
  328. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/impl/filter.py +0 -0
  329. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/impl/if_.py +0 -0
  330. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/impl/random_router.py +0 -0
  331. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/impl/switch.py +0 -0
  332. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/impl/types.py +0 -0
  333. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/job/job.py +0 -0
  334. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/listener/__init__.py +0 -0
  335. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/listener/impl/common.py +0 -0
  336. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/logger/__init__.py +0 -0
  337. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/logger/impl/__init__.py +0 -0
  338. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/logger/impl/common.py +0 -0
  339. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/logger/impl/console.py +0 -0
  340. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/logger/impl/file.py +0 -0
  341. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/logger/impl/types.py +0 -0
  342. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/logger/logger.py +0 -0
  343. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/runtime/__init__.py +0 -0
  344. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/runtime/impl/__init__.py +0 -0
  345. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/runtime/impl/common.py +0 -0
  346. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/runtime/impl/docker.py +0 -0
  347. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/runtime/impl/native.py +0 -0
  348. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/runtime/impl/types.py +0 -0
  349. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/runtime/runtime.py +0 -0
  350. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/transport/__init__.py +0 -0
  351. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/transport/http.py +0 -0
  352. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/transport/ssh.py +0 -0
  353. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/schema/workflow.py +0 -0
  354. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/utils/__init__.py +0 -0
  355. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/utils/annotation.py +0 -0
  356. {model_compose-0.4.8 → model_compose-0.4.10}/src/mindor/dsl/utils/enum.py +0 -0
  357. {model_compose-0.4.8 → model_compose-0.4.10}/src/model_compose.egg-info/dependency_links.txt +0 -0
  358. {model_compose-0.4.8 → model_compose-0.4.10}/src/model_compose.egg-info/entry_points.txt +0 -0
  359. {model_compose-0.4.8 → model_compose-0.4.10}/src/model_compose.egg-info/requires.txt +0 -0
  360. {model_compose-0.4.8 → model_compose-0.4.10}/src/model_compose.egg-info/top_level.txt +0 -0
  361. {model_compose-0.4.8 → model_compose-0.4.10}/tests/test_cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: model-compose
3
- Version: 0.4.8
3
+ Version: 0.4.10
4
4
  Summary: model-compose: Declarative AI Model and Workflow Orchestrator
5
5
  Author-email: Hanyeol Cho <hanyeol.cho@gmail.com>
6
6
  License-Expression: MIT
@@ -65,6 +65,26 @@ pip install -e .
65
65
 
66
66
  ---
67
67
 
68
+ ## 📚 Documentation
69
+
70
+ **📖 [Complete User Guide](docs/user-guide/00-table-of-contents.md)**
71
+
72
+ Need help getting started or want to explore advanced features? Check out our comprehensive user guide:
73
+
74
+ - **🌍 English**: [User Guide](docs/user-guide/00-table-of-contents.md)
75
+ - **🇰🇷 한국어**: [사용자 가이드](docs/user-guide/ko/00-table-of-contents.md)
76
+
77
+ The guide covers everything from basic concepts to advanced workflows, including:
78
+ - Getting started with model-compose
79
+ - Component and workflow configuration
80
+ - Local AI models and training
81
+ - Streaming mode and variable binding
82
+ - System integration with listeners and gateways
83
+ - Deployment strategies
84
+ - Practical examples and troubleshooting
85
+
86
+ ---
87
+
68
88
  ## 🚀 How to Run
69
89
 
70
90
  **model-compose** provides a CLI interface to launch and manage your AI workflows — inspired by `docker-compose`.
@@ -194,35 +214,7 @@ This minimal example defines a simple workflow that calls the OpenAI ChatGPT API
194
214
 
195
215
  You can easily expand this example by adding more components (e.g., text-to-speech, image generation) and connecting them through additional jobs.
196
216
 
197
- #### 📡 Listener Example
198
-
199
- ```
200
- listener:
201
- type: http-callback
202
- port: 8090
203
- base_path: /callbacks
204
- callbacks:
205
- - path: /chat-ai
206
- method: POST
207
- item: ${body.data}
208
- identify_by: ${item.task_id}
209
- result: ${item.choices[0].message.content}
210
- ```
211
-
212
- This listener sets up an HTTP callback endpoint at `http://localhost:8090/callbacks/chat-ai` to handle asynchronous responses from an external service that behaves like ChatGPT but supports delayed or push-based results. This is useful when integrating with services that notify results via webhook-style callbacks.
213
-
214
- #### 🌐 Gateway Example
215
-
216
- ```
217
- gateway:
218
- type: http-tunnel
219
- driver: ngrok
220
- port: 8090
221
- ```
222
-
223
- This gateway configuration exposes the local listener defined above to the public internet using an HTTP tunnel powered by ngrok. It forwards incoming traffic from a secure, public URL (e.g., `https://abc123.ngrok.io`) directly to your local callback endpoint at `http://localhost:8090`. This is essential when integrating with third-party services that need to push data back to your workflow via webhooks or asynchronous callbacks.
224
-
225
- > 📁 For more example model-compose.yml configurations, check the [examples directory](examples) in the source code.
217
+ > 📁 For more example configurations including listeners, gateways, and advanced workflows, check the [examples directory](examples) or refer to the [User Guide](docs/user-guide/00-table-of-contents.md).
226
218
 
227
219
  ---
228
220
  ## 🖥 Web UI
@@ -41,6 +41,26 @@ pip install -e .
41
41
 
42
42
  ---
43
43
 
44
+ ## 📚 Documentation
45
+
46
+ **📖 [Complete User Guide](docs/user-guide/00-table-of-contents.md)**
47
+
48
+ Need help getting started or want to explore advanced features? Check out our comprehensive user guide:
49
+
50
+ - **🌍 English**: [User Guide](docs/user-guide/00-table-of-contents.md)
51
+ - **🇰🇷 한국어**: [사용자 가이드](docs/user-guide/ko/00-table-of-contents.md)
52
+
53
+ The guide covers everything from basic concepts to advanced workflows, including:
54
+ - Getting started with model-compose
55
+ - Component and workflow configuration
56
+ - Local AI models and training
57
+ - Streaming mode and variable binding
58
+ - System integration with listeners and gateways
59
+ - Deployment strategies
60
+ - Practical examples and troubleshooting
61
+
62
+ ---
63
+
44
64
  ## 🚀 How to Run
45
65
 
46
66
  **model-compose** provides a CLI interface to launch and manage your AI workflows — inspired by `docker-compose`.
@@ -170,35 +190,7 @@ This minimal example defines a simple workflow that calls the OpenAI ChatGPT API
170
190
 
171
191
  You can easily expand this example by adding more components (e.g., text-to-speech, image generation) and connecting them through additional jobs.
172
192
 
173
- #### 📡 Listener Example
174
-
175
- ```
176
- listener:
177
- type: http-callback
178
- port: 8090
179
- base_path: /callbacks
180
- callbacks:
181
- - path: /chat-ai
182
- method: POST
183
- item: ${body.data}
184
- identify_by: ${item.task_id}
185
- result: ${item.choices[0].message.content}
186
- ```
187
-
188
- This listener sets up an HTTP callback endpoint at `http://localhost:8090/callbacks/chat-ai` to handle asynchronous responses from an external service that behaves like ChatGPT but supports delayed or push-based results. This is useful when integrating with services that notify results via webhook-style callbacks.
189
-
190
- #### 🌐 Gateway Example
191
-
192
- ```
193
- gateway:
194
- type: http-tunnel
195
- driver: ngrok
196
- port: 8090
197
- ```
198
-
199
- This gateway configuration exposes the local listener defined above to the public internet using an HTTP tunnel powered by ngrok. It forwards incoming traffic from a secure, public URL (e.g., `https://abc123.ngrok.io`) directly to your local callback endpoint at `http://localhost:8090`. This is essential when integrating with third-party services that need to push data back to your workflow via webhooks or asynchronous callbacks.
200
-
201
- > 📁 For more example model-compose.yml configurations, check the [examples directory](examples) in the source code.
193
+ > 📁 For more example configurations including listeners, gateways, and advanced workflows, check the [examples directory](examples) or refer to the [User Guide](docs/user-guide/00-table-of-contents.md).
202
194
 
203
195
  ---
204
196
  ## 🖥 Web UI
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "model-compose"
3
- version = "0.4.8"
3
+ version = "0.4.10"
4
4
  description = "model-compose: Declarative AI Model and Workflow Orchestrator"
5
5
  authors = [
6
6
  { name = "Hanyeol Cho", email = "hanyeol.cho@gmail.com" }
@@ -1,11 +1,18 @@
1
- import click
2
- import json
1
+ from typing import Optional, List
2
+ import importlib.metadata
3
3
  from pathlib import Path
4
+ import click
4
5
  import asyncio
6
+ import json
5
7
 
6
- from mindor.dsl.loader import load_compose_config
7
- from mindor.core.runtime.env import load_env_files, merge_env_data
8
- from mindor.core.compose import *
8
+ def _load_compose_config(config_files: List[Path], env_files: List[Path], env_data: List[str]):
9
+ from mindor.dsl.loader import load_compose_config
10
+ from mindor.core.runtime.env import load_env_files, merge_env_data
11
+
12
+ env = load_env_files(".", env_files or [])
13
+ env = merge_env_data(env, env_data)
14
+
15
+ return load_compose_config(".", config_files, env)
9
16
 
10
17
  @click.group()
11
18
  @click.option(
@@ -13,6 +20,10 @@ from mindor.core.compose import *
13
20
  type=click.Path(exists=True, dir_okay=False, path_type=Path),
14
21
  help="Compose configuration files."
15
22
  )
23
+ @click.version_option(
24
+ version=importlib.metadata.version("model-compose"),
25
+ message="%(prog)s %(version)s"
26
+ )
16
27
  @click.pass_context
17
28
  def compose_command(ctx: click.Context, config_files: List[Path]) -> None:
18
29
  """model-compose"""
@@ -34,18 +45,17 @@ def compose_command(ctx: click.Context, config_files: List[Path]) -> None:
34
45
  @click.option("--verbose", "-v", is_flag=True, help="Enable verbose output.")
35
46
  @click.pass_context
36
47
  def up_command(
37
- ctx: click.Context,
48
+ ctx: click.Context,
38
49
  detach: bool,
39
50
  env_files: List[Path],
40
51
  env_data: List[str],
41
52
  verbose: bool
42
53
  ) -> None:
54
+ from mindor.core.compose import launch_services
43
55
  config_files = ctx.obj.get("config_files", [])
44
56
  async def _async_command():
45
57
  try:
46
- env = load_env_files(".", env_files or [])
47
- env = merge_env_data(env, env_data)
48
- config = load_compose_config(".", config_files, env)
58
+ config = _load_compose_config(config_files, env_files, env_data)
49
59
  await launch_services(config, detach, verbose)
50
60
  except Exception as e:
51
61
  click.echo(f"❌ {e}", err=True)
@@ -70,12 +80,11 @@ def down_command(
70
80
  env_data: List[str],
71
81
  verbose: bool
72
82
  ) -> None:
83
+ from mindor.core.compose import terminate_services
73
84
  config_files = ctx.obj.get("config_files", [])
74
85
  async def _async_command():
75
86
  try:
76
- env = load_env_files(".", env_files or [])
77
- env = merge_env_data(env, env_data)
78
- config = load_compose_config(".", config_files, env)
87
+ config = _load_compose_config(config_files, env_files, env_data)
79
88
  await terminate_services(config, verbose)
80
89
  except Exception as e:
81
90
  click.echo(f"❌ {e}", err=True)
@@ -100,12 +109,11 @@ def start_command(
100
109
  env_data: List[str],
101
110
  verbose: bool
102
111
  ) -> None:
112
+ from mindor.core.compose import start_services
103
113
  config_files = ctx.obj.get("config_files", [])
104
114
  async def _async_command():
105
115
  try:
106
- env = load_env_files(".", env_files or [])
107
- env = merge_env_data(env, env_data)
108
- config = load_compose_config(".", config_files, env)
116
+ config = _load_compose_config(config_files, env_files, env_data)
109
117
  await start_services(config, verbose)
110
118
  except Exception as e:
111
119
  click.echo(f"❌ {e}", err=True)
@@ -130,12 +138,11 @@ def stop_command(
130
138
  env_data: List[str],
131
139
  verbose: bool
132
140
  ) -> None:
141
+ from mindor.core.compose import stop_services
133
142
  config_files = ctx.obj.get("config_files", [])
134
143
  async def _async_command():
135
144
  try:
136
- env = load_env_files(".", env_files or [])
137
- env = merge_env_data(env, env_data)
138
- config = load_compose_config(".", config_files, env)
145
+ config = _load_compose_config(config_files, env_files, env_data)
139
146
  await stop_services(config, verbose)
140
147
  except Exception as e:
141
148
  click.echo(f"❌ {e}", err=True)
@@ -176,12 +183,11 @@ def run_command(
176
183
  output_path: Optional[Path],
177
184
  verbose: bool
178
185
  ) -> None:
186
+ from mindor.core.compose import run_workflow
179
187
  config_files = ctx.obj.get("config_files", [])
180
188
  async def _async_command():
181
189
  try:
182
- env = load_env_files(".", env_files or [])
183
- env = merge_env_data(env, env_data)
184
- config = load_compose_config(".", config_files, env)
190
+ config = _load_compose_config(config_files, env_files, env_data)
185
191
  input = json.loads(input_json) if input_json else {}
186
192
  state = await run_workflow(config, workflow_id or "__default__", input, output_path, verbose)
187
193
  if isinstance(state.output, (dict, list)) or state.error:
@@ -1,6 +1,7 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
2
  from mindor.core.utils.renderers import VariableRenderer, ImageValueRenderer
3
3
  from mindor.core.gateway import find_gateway_by_port
4
+ from PIL import Image as PILImage
4
5
 
5
6
  class ComponentActionContext:
6
7
  def __init__(self, run_id: str, input: Dict[str, Any]):
@@ -16,7 +17,7 @@ class ComponentActionContext:
16
17
  async def render_variable(self, value: Any, ignore_files: bool = False) -> Any:
17
18
  return await self.renderer.render(value, ignore_files)
18
19
 
19
- async def render_image(self, value: Any) -> Any:
20
+ async def render_image(self, value: Any) -> Optional[PILImage.Image]:
20
21
  return await ImageValueRenderer().render(await self.render_variable(value))
21
22
 
22
23
  def contains_variable_reference(self, key: str, value: Any) -> bool:
@@ -8,3 +8,4 @@ from .vector_store import *
8
8
  from .workflow import *
9
9
  from .shell import *
10
10
  from .text_splitter import *
11
+ from .image_processor import *
@@ -6,6 +6,7 @@ from mindor.dsl.schema.action import DatasetsActionConfig, DatasetsActionMethod,
6
6
  from ...base import ComponentService, ComponentType, ComponentGlobalConfigs, register_component
7
7
  from ...context import ComponentActionContext
8
8
  from .providers import HuggingfaceDatasetsProvider, LocalDatasetsProvider
9
+ from .utils import format_template_example
9
10
 
10
11
  if TYPE_CHECKING:
11
12
  from datasets import Dataset
@@ -30,6 +31,9 @@ class DatasetsAction:
30
31
  if self.config.method == DatasetsActionMethod.SELECT:
31
32
  return await self._select(context)
32
33
 
34
+ if self.config.method == DatasetsActionMethod.MAP:
35
+ return await self._map(context)
36
+
33
37
  raise ValueError(f"Unsupported datasets action method: {self.config.method}")
34
38
 
35
39
  async def _load(self, context: ComponentActionContext) -> Dataset:
@@ -64,6 +68,10 @@ class DatasetsAction:
64
68
  info = await context.render_variable(self.config.info)
65
69
  split = await context.render_variable(self.config.split)
66
70
 
71
+ for dataset in datasets:
72
+ if not isinstance(dataset, Dataset):
73
+ raise ValueError(f"Expected Dataset instance, but got {type(dataset).__name__}")
74
+
67
75
  return concatenate_datasets(
68
76
  datasets,
69
77
  info=info,
@@ -77,6 +85,9 @@ class DatasetsAction:
77
85
  indices = await context.render_variable(self.config.indices)
78
86
  columns = await context.render_variable(self.config.columns)
79
87
 
88
+ if not isinstance(dataset, Dataset):
89
+ raise ValueError(f"Expected Dataset instance, but got {type(dataset).__name__}")
90
+
80
91
  if axis == "rows":
81
92
  if indices is None:
82
93
  raise ValueError("indices must be provided when axis='rows'")
@@ -89,6 +100,20 @@ class DatasetsAction:
89
100
 
90
101
  raise ValueError(f"Unsupported axis: {axis}")
91
102
 
103
+ async def _map(self, context: ComponentActionContext) -> Dataset:
104
+ dataset = await context.render_variable(self.config.dataset)
105
+ template = await context.render_variable(self.config.template)
106
+ output_column = await context.render_variable(self.config.output_column)
107
+ remove_columns = await context.render_variable(self.config.remove_columns)
108
+
109
+ if not isinstance(dataset, Dataset):
110
+ raise ValueError(f"Expected Dataset instance, but got {type(dataset).__name__}")
111
+
112
+ def format_example(example):
113
+ return { output_column: format_template_example(template, example) }
114
+
115
+ return dataset.map(format_example, remove_columns=remove_columns)
116
+
92
117
  @register_component(ComponentType.DATASETS)
93
118
  class DatasetsComponent(ComponentService):
94
119
  def __init__(self, id: str, config: DatasetsActionConfig, global_configs: ComponentGlobalConfigs, daemon: bool):
@@ -0,0 +1,12 @@
1
+ from typing import Dict, List, Any
2
+ import re
3
+
4
+ def format_template_example(template: str, example: Dict[str, Any]) -> str:
5
+ column_names = set(re.findall(r"\{(\w+)\}", template))
6
+ formatted = template
7
+
8
+ for column in column_names:
9
+ if column in example:
10
+ formatted = formatted.replace(f"{{{column}}}", str(example[column]))
11
+
12
+ return formatted
@@ -0,0 +1,210 @@
1
+ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
+ from mindor.dsl.schema.component import ImageProcessorComponentConfig
3
+ from mindor.dsl.schema.action import ActionConfig, ImageProcessorActionConfig, ImageProcessorActionMethod, ImageScaleMode, FlipDirection
4
+ from ..base import ComponentService, ComponentType, ComponentGlobalConfigs, register_component
5
+ from ..context import ComponentActionContext
6
+ from PIL import Image as PILImage, ImageFilter, ImageEnhance
7
+
8
+ class ImageProcessorAction:
9
+ def __init__(self, config: ImageProcessorActionConfig):
10
+ self.config: ImageProcessorActionConfig = config
11
+
12
+ async def run(self, context: ComponentActionContext) -> Any:
13
+ result = await self._dispatch(context)
14
+ context.register_source("result", result)
15
+
16
+ return (await context.render_variable(self.config.output, ignore_files=True)) if self.config.output else result
17
+
18
+ async def _dispatch(self, context: ComponentActionContext) -> Any:
19
+ if self.config.method == ImageProcessorActionMethod.RESIZE:
20
+ return await self._resize(context)
21
+
22
+ if self.config.method == ImageProcessorActionMethod.CROP:
23
+ return await self._crop(context)
24
+
25
+ if self.config.method == ImageProcessorActionMethod.ROTATE:
26
+ return await self._rotate(context)
27
+
28
+ if self.config.method == ImageProcessorActionMethod.FLIP:
29
+ return await self._flip(context)
30
+
31
+ if self.config.method == ImageProcessorActionMethod.GRAYSCALE:
32
+ return await self._grayscale(context)
33
+
34
+ if self.config.method == ImageProcessorActionMethod.BLUR:
35
+ return await self._blur(context)
36
+
37
+ if self.config.method == ImageProcessorActionMethod.SHARPEN:
38
+ return await self._sharpen(context)
39
+
40
+ if self.config.method == ImageProcessorActionMethod.ADJUST_BRIGHTNESS:
41
+ return await self._adjust_brightness(context)
42
+
43
+ if self.config.method == ImageProcessorActionMethod.ADJUST_CONTRAST:
44
+ return await self._adjust_contrast(context)
45
+
46
+ if self.config.method == ImageProcessorActionMethod.ADJUST_SATURATION:
47
+ return await self._adjust_saturation(context)
48
+
49
+ raise ValueError(f"Unsupported image processing action method: {self.config.method}")
50
+
51
+ async def _resize(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
52
+ image = await context.render_image(self.config.image)
53
+ width = await context.render_variable(self.config.width) if self.config.width else None
54
+ height = await context.render_variable(self.config.height) if self.config.height else None
55
+ scale_mode = await context.render_variable(self.config.scale_mode)
56
+
57
+ if width is None and height is None:
58
+ raise ValueError("At least one of width or height must be specified for resize")
59
+
60
+ if image:
61
+ return self._resize_image(image, width, height, scale_mode)
62
+
63
+ return None
64
+
65
+ async def _crop(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
66
+ image = await context.render_image(self.config.image)
67
+ x = await context.render_variable(self.config.x)
68
+ y = await context.render_variable(self.config.y)
69
+ width = await context.render_variable(self.config.width)
70
+ height = await context.render_variable(self.config.height)
71
+
72
+ if image:
73
+ return image.crop(x, y, x + width, y + height)
74
+
75
+ return None
76
+
77
+ async def _rotate(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
78
+ image = await context.render_image(self.config.image)
79
+ angle = await context.render_variable(self.config.angle)
80
+ expand = await context.render_variable(self.config.expand)
81
+
82
+ if image:
83
+ return image.rotate(-angle, expand=expand, resample=PILImage.Resampling.BICUBIC)
84
+
85
+ return None
86
+
87
+ async def _flip(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
88
+ image = await context.render_image(self.config.image)
89
+ direction = await context.render_variable(self.config.direction)
90
+
91
+ if image:
92
+ if direction == FlipDirection.HORIZONTAL:
93
+ return image.transpose(PILImage.Transpose.FLIP_LEFT_RIGHT)
94
+
95
+ if direction == FlipDirection.VERTICAL:
96
+ return image.transpose(PILImage.Transpose.FLIP_TOP_BOTTOM)
97
+
98
+ return None
99
+
100
+ async def _grayscale(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
101
+ image = await context.render_image(self.config.image)
102
+
103
+ if image:
104
+ return image.convert("L")
105
+
106
+ return None
107
+
108
+ async def _blur(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
109
+ image = await context.render_image(self.config.image)
110
+ radius = await context.render_variable(self.config.radius)
111
+
112
+ if image:
113
+ return image.filter(ImageFilter.GaussianBlur(radius=radius))
114
+
115
+ async def _sharpen(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
116
+ image = await context.render_image(self.config.image)
117
+ factor = await context.render_variable(self.config.factor)
118
+
119
+ if image:
120
+ return ImageEnhance.Sharpness(image).enhance(factor)
121
+
122
+ return FileNotFoundError
123
+
124
+ async def _adjust_brightness(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
125
+ image = await context.render_image(self.config.image)
126
+ factor = await context.render_variable(self.config.factor)
127
+
128
+ if image:
129
+ return ImageEnhance.Brightness(image).enhance(factor)
130
+
131
+ return None
132
+
133
+ async def _adjust_contrast(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
134
+ image = await context.render_image(self.config.image)
135
+ factor = await context.render_variable(self.config.factor)
136
+
137
+ if image:
138
+ return ImageEnhance.Contrast(image).enhance(factor)
139
+
140
+ return image
141
+
142
+ async def _adjust_saturation(self, context: ComponentActionContext) -> Optional[PILImage.Image]:
143
+ image = await context.render_image(self.config.image)
144
+ factor = await context.render_variable(self.config.factor)
145
+
146
+ if image:
147
+ return ImageEnhance.Color(image).enhance(factor)
148
+
149
+ return None
150
+
151
+ def _resize_image(self, image: PILImage.Image, width: int, height: int, scale_mode: str) -> PILImage.Image:
152
+ original_width, original_height = image.size
153
+ target_width = width or original_width
154
+ target_height = height or original_height
155
+
156
+ if scale_mode == ImageScaleMode.FIT:
157
+ new_width, new_height = self._get_size_aspect_fit(target_width, target_height, original_width, original_height)
158
+ return image.resize((new_width, new_height), PILImage.Resampling.LANCZOS)
159
+
160
+ if scale_mode == ImageScaleMode.FILL:
161
+ new_width, new_height = self._get_size_aspect_fill(target_width, target_height, original_width, original_height)
162
+ image = image.resize((new_width, new_height), PILImage.Resampling.LANCZOS)
163
+
164
+ crop_box = self._get_center_crop_box(new_width, new_height, target_width, target_height)
165
+ return image.crop(crop_box)
166
+
167
+ if scale_mode == ImageScaleMode.STRETCH:
168
+ return image.resize((target_width, target_height), PILImage.Resampling.LANCZOS)
169
+
170
+ raise ValueError(f"Invalid scale_mode: {scale_mode}")
171
+
172
+ def _get_size_aspect_fit(self, target_width: int, target_height: int, original_width: int, original_height: int) -> Tuple[int, int]:
173
+ aspect_ratio = original_width / original_height
174
+
175
+ height = target_height
176
+ width = height * aspect_ratio
177
+
178
+ if width > target_width:
179
+ width = target_width
180
+ height = width / aspect_ratio
181
+
182
+ return (int(width), int(height))
183
+
184
+ def _get_size_aspect_fill(self, target_width: int, target_height: int, original_width: int, original_height: int) -> Tuple[int, int]:
185
+ aspect_ratio = original_width / original_height
186
+
187
+ height = target_height
188
+ width = height * aspect_ratio
189
+
190
+ if width < target_width:
191
+ width = target_width
192
+ height = width / aspect_ratio
193
+
194
+ return (int(width), int(height))
195
+
196
+ def _get_center_crop_box(self, image_width: int, image_height: int, target_width: int, target_height: int) -> Tuple[int, int, int, int]:
197
+ left = (image_width - target_width ) // 2
198
+ top = (image_height - target_height) // 2
199
+ right = left + target_width
200
+ bottom = top + target_height
201
+
202
+ return (left, top, right, bottom)
203
+
204
+ @register_component(ComponentType.IMAGE_PROCESSOR)
205
+ class ImageProcessorComponent(ComponentService):
206
+ def __init__(self, id: str, config: ImageProcessorComponentConfig, global_configs: ComponentGlobalConfigs, daemon: bool):
207
+ super().__init__(id, config, global_configs, daemon)
208
+
209
+ async def _run(self, action: ActionConfig, context: ComponentActionContext) -> Any:
210
+ return await ImageProcessorAction(action).run(context)