isa-model 0.3.91__py3-none-any.whl → 0.4.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. isa_model/client.py +1166 -584
  2. isa_model/core/cache/redis_cache.py +410 -0
  3. isa_model/core/config/config_manager.py +282 -12
  4. isa_model/core/config.py +91 -1
  5. isa_model/core/database/__init__.py +1 -0
  6. isa_model/core/database/direct_db_client.py +114 -0
  7. isa_model/core/database/migration_manager.py +563 -0
  8. isa_model/core/database/migrations.py +297 -0
  9. isa_model/core/database/supabase_client.py +258 -0
  10. isa_model/core/dependencies.py +316 -0
  11. isa_model/core/discovery/__init__.py +19 -0
  12. isa_model/core/discovery/consul_discovery.py +190 -0
  13. isa_model/core/logging/__init__.py +54 -0
  14. isa_model/core/logging/influx_logger.py +523 -0
  15. isa_model/core/logging/loki_logger.py +160 -0
  16. isa_model/core/models/__init__.py +46 -0
  17. isa_model/core/models/config_models.py +625 -0
  18. isa_model/core/models/deployment_billing_tracker.py +430 -0
  19. isa_model/core/models/model_billing_tracker.py +60 -88
  20. isa_model/core/models/model_manager.py +66 -25
  21. isa_model/core/models/model_metadata.py +690 -0
  22. isa_model/core/models/model_repo.py +217 -55
  23. isa_model/core/models/model_statistics_tracker.py +234 -0
  24. isa_model/core/models/model_storage.py +0 -1
  25. isa_model/core/models/model_version_manager.py +959 -0
  26. isa_model/core/models/system_models.py +857 -0
  27. isa_model/core/pricing_manager.py +2 -249
  28. isa_model/core/repositories/__init__.py +9 -0
  29. isa_model/core/repositories/config_repository.py +912 -0
  30. isa_model/core/resilience/circuit_breaker.py +366 -0
  31. isa_model/core/security/secrets.py +358 -0
  32. isa_model/core/services/__init__.py +2 -4
  33. isa_model/core/services/intelligent_model_selector.py +479 -370
  34. isa_model/core/storage/hf_storage.py +2 -2
  35. isa_model/core/types.py +8 -0
  36. isa_model/deployment/__init__.py +5 -48
  37. isa_model/deployment/core/__init__.py +2 -31
  38. isa_model/deployment/core/deployment_manager.py +1278 -368
  39. isa_model/deployment/local/__init__.py +31 -0
  40. isa_model/deployment/local/config.py +248 -0
  41. isa_model/deployment/local/gpu_gateway.py +607 -0
  42. isa_model/deployment/local/health_checker.py +428 -0
  43. isa_model/deployment/local/provider.py +586 -0
  44. isa_model/deployment/local/tensorrt_service.py +621 -0
  45. isa_model/deployment/local/transformers_service.py +644 -0
  46. isa_model/deployment/local/vllm_service.py +527 -0
  47. isa_model/deployment/modal/__init__.py +8 -0
  48. isa_model/deployment/modal/config.py +136 -0
  49. isa_model/deployment/modal/deployer.py +894 -0
  50. isa_model/deployment/modal/services/__init__.py +3 -0
  51. isa_model/deployment/modal/services/audio/__init__.py +1 -0
  52. isa_model/deployment/modal/services/audio/isa_audio_chatTTS_service.py +520 -0
  53. isa_model/deployment/modal/services/audio/isa_audio_openvoice_service.py +758 -0
  54. isa_model/deployment/modal/services/audio/isa_audio_service_v2.py +1044 -0
  55. isa_model/deployment/modal/services/embedding/__init__.py +1 -0
  56. isa_model/deployment/modal/services/embedding/isa_embed_rerank_service.py +296 -0
  57. isa_model/deployment/modal/services/llm/__init__.py +1 -0
  58. isa_model/deployment/modal/services/llm/isa_llm_service.py +424 -0
  59. isa_model/deployment/modal/services/video/__init__.py +1 -0
  60. isa_model/deployment/modal/services/video/isa_video_hunyuan_service.py +423 -0
  61. isa_model/deployment/modal/services/vision/__init__.py +1 -0
  62. isa_model/deployment/modal/services/vision/isa_vision_ocr_service.py +519 -0
  63. isa_model/deployment/modal/services/vision/isa_vision_qwen25_service.py +709 -0
  64. isa_model/deployment/modal/services/vision/isa_vision_table_service.py +676 -0
  65. isa_model/deployment/modal/services/vision/isa_vision_ui_service.py +833 -0
  66. isa_model/deployment/modal/services/vision/isa_vision_ui_service_optimized.py +660 -0
  67. isa_model/deployment/models/org-org-acme-corp-tenant-a-service-llm-20250825-225822/tenant-a-service_modal_service.py +48 -0
  68. isa_model/deployment/models/org-test-org-123-prefix-test-service-llm-20250825-225822/prefix-test-service_modal_service.py +48 -0
  69. isa_model/deployment/models/test-llm-service-llm-20250825-204442/test-llm-service_modal_service.py +48 -0
  70. isa_model/deployment/models/test-monitoring-gpt2-llm-20250825-212906/test-monitoring-gpt2_modal_service.py +48 -0
  71. isa_model/deployment/models/test-monitoring-gpt2-llm-20250825-213009/test-monitoring-gpt2_modal_service.py +48 -0
  72. isa_model/deployment/storage/__init__.py +5 -0
  73. isa_model/deployment/storage/deployment_repository.py +824 -0
  74. isa_model/deployment/triton/__init__.py +10 -0
  75. isa_model/deployment/triton/config.py +196 -0
  76. isa_model/deployment/triton/configs/__init__.py +1 -0
  77. isa_model/deployment/triton/provider.py +512 -0
  78. isa_model/deployment/triton/scripts/__init__.py +1 -0
  79. isa_model/deployment/triton/templates/__init__.py +1 -0
  80. isa_model/inference/__init__.py +47 -1
  81. isa_model/inference/ai_factory.py +179 -16
  82. isa_model/inference/legacy_services/__init__.py +21 -0
  83. isa_model/inference/legacy_services/model_evaluation.py +637 -0
  84. isa_model/inference/legacy_services/model_service.py +573 -0
  85. isa_model/inference/legacy_services/model_serving.py +717 -0
  86. isa_model/inference/legacy_services/model_training.py +561 -0
  87. isa_model/inference/models/__init__.py +21 -0
  88. isa_model/inference/models/inference_config.py +551 -0
  89. isa_model/inference/models/inference_record.py +675 -0
  90. isa_model/inference/models/performance_models.py +714 -0
  91. isa_model/inference/repositories/__init__.py +9 -0
  92. isa_model/inference/repositories/inference_repository.py +828 -0
  93. isa_model/inference/services/audio/__init__.py +21 -0
  94. isa_model/inference/services/audio/base_realtime_service.py +225 -0
  95. isa_model/inference/services/audio/base_stt_service.py +184 -11
  96. isa_model/inference/services/audio/isa_tts_service.py +0 -0
  97. isa_model/inference/services/audio/openai_realtime_service.py +320 -124
  98. isa_model/inference/services/audio/openai_stt_service.py +53 -11
  99. isa_model/inference/services/base_service.py +17 -1
  100. isa_model/inference/services/custom_model_manager.py +277 -0
  101. isa_model/inference/services/embedding/__init__.py +13 -0
  102. isa_model/inference/services/embedding/base_embed_service.py +111 -8
  103. isa_model/inference/services/embedding/isa_embed_service.py +305 -0
  104. isa_model/inference/services/embedding/ollama_embed_service.py +15 -3
  105. isa_model/inference/services/embedding/openai_embed_service.py +2 -4
  106. isa_model/inference/services/embedding/resilient_embed_service.py +285 -0
  107. isa_model/inference/services/embedding/tests/test_embedding.py +222 -0
  108. isa_model/inference/services/img/__init__.py +2 -2
  109. isa_model/inference/services/img/base_image_gen_service.py +24 -7
  110. isa_model/inference/services/img/replicate_image_gen_service.py +84 -422
  111. isa_model/inference/services/img/services/replicate_face_swap.py +193 -0
  112. isa_model/inference/services/img/services/replicate_flux.py +226 -0
  113. isa_model/inference/services/img/services/replicate_flux_kontext.py +219 -0
  114. isa_model/inference/services/img/services/replicate_sticker_maker.py +249 -0
  115. isa_model/inference/services/img/tests/test_img_client.py +297 -0
  116. isa_model/inference/services/llm/__init__.py +10 -2
  117. isa_model/inference/services/llm/base_llm_service.py +361 -26
  118. isa_model/inference/services/llm/cerebras_llm_service.py +628 -0
  119. isa_model/inference/services/llm/helpers/llm_adapter.py +71 -12
  120. isa_model/inference/services/llm/helpers/llm_prompts.py +342 -0
  121. isa_model/inference/services/llm/helpers/llm_utils.py +321 -23
  122. isa_model/inference/services/llm/huggingface_llm_service.py +581 -0
  123. isa_model/inference/services/llm/local_llm_service.py +747 -0
  124. isa_model/inference/services/llm/ollama_llm_service.py +11 -3
  125. isa_model/inference/services/llm/openai_llm_service.py +670 -56
  126. isa_model/inference/services/llm/yyds_llm_service.py +10 -3
  127. isa_model/inference/services/vision/__init__.py +27 -6
  128. isa_model/inference/services/vision/base_vision_service.py +118 -185
  129. isa_model/inference/services/vision/blip_vision_service.py +359 -0
  130. isa_model/inference/services/vision/helpers/image_utils.py +19 -10
  131. isa_model/inference/services/vision/isa_vision_service.py +634 -0
  132. isa_model/inference/services/vision/openai_vision_service.py +19 -10
  133. isa_model/inference/services/vision/tests/test_ocr_client.py +284 -0
  134. isa_model/inference/services/vision/vgg16_vision_service.py +257 -0
  135. isa_model/serving/api/cache_manager.py +245 -0
  136. isa_model/serving/api/dependencies/__init__.py +1 -0
  137. isa_model/serving/api/dependencies/auth.py +194 -0
  138. isa_model/serving/api/dependencies/database.py +139 -0
  139. isa_model/serving/api/error_handlers.py +284 -0
  140. isa_model/serving/api/fastapi_server.py +240 -18
  141. isa_model/serving/api/middleware/auth.py +317 -0
  142. isa_model/serving/api/middleware/security.py +268 -0
  143. isa_model/serving/api/middleware/tenant_context.py +414 -0
  144. isa_model/serving/api/routes/analytics.py +489 -0
  145. isa_model/serving/api/routes/config.py +645 -0
  146. isa_model/serving/api/routes/deployment_billing.py +315 -0
  147. isa_model/serving/api/routes/deployments.py +475 -0
  148. isa_model/serving/api/routes/gpu_gateway.py +440 -0
  149. isa_model/serving/api/routes/health.py +32 -12
  150. isa_model/serving/api/routes/inference_monitoring.py +486 -0
  151. isa_model/serving/api/routes/local_deployments.py +448 -0
  152. isa_model/serving/api/routes/logs.py +430 -0
  153. isa_model/serving/api/routes/settings.py +582 -0
  154. isa_model/serving/api/routes/tenants.py +575 -0
  155. isa_model/serving/api/routes/unified.py +992 -171
  156. isa_model/serving/api/routes/webhooks.py +479 -0
  157. isa_model/serving/api/startup.py +318 -0
  158. isa_model/serving/modal_proxy_server.py +249 -0
  159. isa_model/utils/gpu_utils.py +311 -0
  160. {isa_model-0.3.91.dist-info → isa_model-0.4.3.dist-info}/METADATA +76 -22
  161. isa_model-0.4.3.dist-info/RECORD +193 -0
  162. isa_model/deployment/cloud/__init__.py +0 -9
  163. isa_model/deployment/cloud/modal/__init__.py +0 -10
  164. isa_model/deployment/cloud/modal/isa_vision_doc_service.py +0 -766
  165. isa_model/deployment/cloud/modal/isa_vision_table_service.py +0 -532
  166. isa_model/deployment/cloud/modal/isa_vision_ui_service.py +0 -406
  167. isa_model/deployment/cloud/modal/register_models.py +0 -321
  168. isa_model/deployment/core/deployment_config.py +0 -356
  169. isa_model/deployment/core/isa_deployment_service.py +0 -401
  170. isa_model/deployment/gpu_int8_ds8/app/server.py +0 -66
  171. isa_model/deployment/gpu_int8_ds8/scripts/test_client.py +0 -43
  172. isa_model/deployment/gpu_int8_ds8/scripts/test_client_os.py +0 -35
  173. isa_model/deployment/runtime/deployed_service.py +0 -338
  174. isa_model/deployment/services/__init__.py +0 -9
  175. isa_model/deployment/services/auto_deploy_vision_service.py +0 -538
  176. isa_model/deployment/services/model_service.py +0 -332
  177. isa_model/deployment/services/service_monitor.py +0 -356
  178. isa_model/deployment/services/service_registry.py +0 -527
  179. isa_model/eval/__init__.py +0 -92
  180. isa_model/eval/benchmarks.py +0 -469
  181. isa_model/eval/config/__init__.py +0 -10
  182. isa_model/eval/config/evaluation_config.py +0 -108
  183. isa_model/eval/evaluators/__init__.py +0 -18
  184. isa_model/eval/evaluators/base_evaluator.py +0 -503
  185. isa_model/eval/evaluators/llm_evaluator.py +0 -472
  186. isa_model/eval/factory.py +0 -531
  187. isa_model/eval/infrastructure/__init__.py +0 -24
  188. isa_model/eval/infrastructure/experiment_tracker.py +0 -466
  189. isa_model/eval/metrics.py +0 -798
  190. isa_model/inference/adapter/unified_api.py +0 -248
  191. isa_model/inference/services/helpers/stacked_config.py +0 -148
  192. isa_model/inference/services/img/flux_professional_service.py +0 -603
  193. isa_model/inference/services/img/helpers/base_stacked_service.py +0 -274
  194. isa_model/inference/services/others/table_transformer_service.py +0 -61
  195. isa_model/inference/services/vision/doc_analysis_service.py +0 -640
  196. isa_model/inference/services/vision/helpers/base_stacked_service.py +0 -274
  197. isa_model/inference/services/vision/ui_analysis_service.py +0 -823
  198. isa_model/scripts/inference_tracker.py +0 -283
  199. isa_model/scripts/mlflow_manager.py +0 -379
  200. isa_model/scripts/model_registry.py +0 -465
  201. isa_model/scripts/register_models.py +0 -370
  202. isa_model/scripts/register_models_with_embeddings.py +0 -510
  203. isa_model/scripts/start_mlflow.py +0 -95
  204. isa_model/scripts/training_tracker.py +0 -257
  205. isa_model/training/__init__.py +0 -74
  206. isa_model/training/annotation/annotation_schema.py +0 -47
  207. isa_model/training/annotation/processors/annotation_processor.py +0 -126
  208. isa_model/training/annotation/storage/dataset_manager.py +0 -131
  209. isa_model/training/annotation/storage/dataset_schema.py +0 -44
  210. isa_model/training/annotation/tests/test_annotation_flow.py +0 -109
  211. isa_model/training/annotation/tests/test_minio copy.py +0 -113
  212. isa_model/training/annotation/tests/test_minio_upload.py +0 -43
  213. isa_model/training/annotation/views/annotation_controller.py +0 -158
  214. isa_model/training/cloud/__init__.py +0 -22
  215. isa_model/training/cloud/job_orchestrator.py +0 -402
  216. isa_model/training/cloud/runpod_trainer.py +0 -454
  217. isa_model/training/cloud/storage_manager.py +0 -482
  218. isa_model/training/core/__init__.py +0 -23
  219. isa_model/training/core/config.py +0 -181
  220. isa_model/training/core/dataset.py +0 -222
  221. isa_model/training/core/trainer.py +0 -720
  222. isa_model/training/core/utils.py +0 -213
  223. isa_model/training/factory.py +0 -424
  224. isa_model-0.3.91.dist-info/RECORD +0 -138
  225. /isa_model/{core/storage/minio_storage.py → deployment/modal/services/audio/isa_audio_fish_service.py} +0 -0
  226. /isa_model/deployment/{services → modal/services/vision}/simple_auto_deploy_vision_service.py +0 -0
  227. {isa_model-0.3.91.dist-info → isa_model-0.4.3.dist-info}/WHEEL +0 -0
  228. {isa_model-0.3.91.dist-info → isa_model-0.4.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,311 @@
1
+ """
2
+ GPU detection and resource management utilities
3
+
4
+ Provides functions for detecting and managing local GPU resources.
5
+ """
6
+
7
+ import os
8
+ import logging
9
+ import subprocess
10
+ from typing import Dict, List, Optional, Any, Tuple
11
+ from dataclasses import dataclass
12
+ import platform
13
+
14
+ logger = logging.getLogger(__name__)
15
+
16
+
17
+ @dataclass
18
+ class GPUInfo:
19
+ """GPU information structure"""
20
+ gpu_id: int
21
+ name: str
22
+ memory_total: int # MB
23
+ memory_free: int # MB
24
+ memory_used: int # MB
25
+ utilization: float # %
26
+ temperature: Optional[int] = None # Celsius
27
+ power_draw: Optional[float] = None # Watts
28
+ driver_version: Optional[str] = None
29
+ cuda_version: Optional[str] = None
30
+
31
+
32
+ class GPUManager:
33
+ """Local GPU resource manager"""
34
+
35
+ def __init__(self):
36
+ self.gpus: List[GPUInfo] = []
37
+ self.cuda_available = False
38
+ self.nvidia_smi_available = False
39
+ self._initialize()
40
+
41
+ def _initialize(self):
42
+ """Initialize GPU detection"""
43
+ self.cuda_available = self._check_cuda_availability()
44
+ self.nvidia_smi_available = self._check_nvidia_smi()
45
+
46
+ if self.nvidia_smi_available:
47
+ self.gpus = self._detect_nvidia_gpus()
48
+ elif self.cuda_available:
49
+ self.gpus = self._detect_cuda_gpus_fallback()
50
+ else:
51
+ logger.warning("No CUDA-capable GPUs detected")
52
+
53
+ def _check_cuda_availability(self) -> bool:
54
+ """Check if CUDA is available through PyTorch"""
55
+ try:
56
+ import torch
57
+ available = torch.cuda.is_available()
58
+ if available:
59
+ logger.info(f"CUDA detected: {torch.cuda.device_count()} devices")
60
+ logger.info(f"CUDA version: {torch.version.cuda}")
61
+ return available
62
+ except ImportError:
63
+ logger.warning("PyTorch not available for CUDA detection")
64
+ return False
65
+ except Exception as e:
66
+ logger.warning(f"CUDA detection failed: {e}")
67
+ return False
68
+
69
+ def _check_nvidia_smi(self) -> bool:
70
+ """Check if nvidia-smi is available"""
71
+ try:
72
+ result = subprocess.run(['nvidia-smi', '--version'],
73
+ capture_output=True, text=True, timeout=5)
74
+ return result.returncode == 0
75
+ except (subprocess.TimeoutExpired, FileNotFoundError, subprocess.SubprocessError):
76
+ return False
77
+
78
+ def _detect_nvidia_gpus(self) -> List[GPUInfo]:
79
+ """Detect GPUs using nvidia-smi"""
80
+ gpus = []
81
+
82
+ try:
83
+ # Get GPU information using nvidia-smi
84
+ cmd = [
85
+ 'nvidia-smi',
86
+ '--query-gpu=index,name,memory.total,memory.free,memory.used,utilization.gpu,temperature.gpu,power.draw,driver_version',
87
+ '--format=csv,noheader,nounits'
88
+ ]
89
+
90
+ result = subprocess.run(cmd, capture_output=True, text=True, timeout=10)
91
+
92
+ if result.returncode == 0:
93
+ lines = result.stdout.strip().split('\n')
94
+ for line in lines:
95
+ if line.strip():
96
+ parts = [p.strip() for p in line.split(',')]
97
+ if len(parts) >= 7:
98
+ gpu_info = GPUInfo(
99
+ gpu_id=int(parts[0]),
100
+ name=parts[1],
101
+ memory_total=int(parts[2]),
102
+ memory_free=int(parts[3]),
103
+ memory_used=int(parts[4]),
104
+ utilization=float(parts[5]),
105
+ temperature=int(parts[6]) if parts[6] != '[Not Supported]' else None,
106
+ power_draw=float(parts[7]) if len(parts) > 7 and parts[7] != '[Not Supported]' else None,
107
+ driver_version=parts[8] if len(parts) > 8 else None
108
+ )
109
+ gpus.append(gpu_info)
110
+
111
+ # Get CUDA version
112
+ try:
113
+ cuda_result = subprocess.run(['nvcc', '--version'],
114
+ capture_output=True, text=True, timeout=5)
115
+ if cuda_result.returncode == 0:
116
+ for line in cuda_result.stdout.split('\n'):
117
+ if 'release' in line.lower():
118
+ cuda_version = line.split()[-1].rstrip(',')
119
+ for gpu in gpus:
120
+ gpu.cuda_version = cuda_version
121
+ break
122
+ except (subprocess.TimeoutExpired, FileNotFoundError):
123
+ pass
124
+
125
+ except Exception as e:
126
+ logger.error(f"Failed to detect GPUs with nvidia-smi: {e}")
127
+
128
+ return gpus
129
+
130
+ def _detect_cuda_gpus_fallback(self) -> List[GPUInfo]:
131
+ """Fallback GPU detection using PyTorch"""
132
+ gpus = []
133
+
134
+ try:
135
+ import torch
136
+ if torch.cuda.is_available():
137
+ for i in range(torch.cuda.device_count()):
138
+ props = torch.cuda.get_device_properties(i)
139
+
140
+ # Get memory info
141
+ torch.cuda.set_device(i)
142
+ memory_total = torch.cuda.get_device_properties(i).total_memory // (1024**2) # MB
143
+ memory_free = (torch.cuda.get_device_properties(i).total_memory - torch.cuda.memory_allocated(i)) // (1024**2)
144
+ memory_used = torch.cuda.memory_allocated(i) // (1024**2)
145
+
146
+ gpu_info = GPUInfo(
147
+ gpu_id=i,
148
+ name=props.name,
149
+ memory_total=memory_total,
150
+ memory_free=memory_free,
151
+ memory_used=memory_used,
152
+ utilization=0.0, # Cannot get utilization without nvidia-smi
153
+ cuda_version=torch.version.cuda
154
+ )
155
+ gpus.append(gpu_info)
156
+
157
+ except Exception as e:
158
+ logger.error(f"Failed to detect GPUs with PyTorch: {e}")
159
+
160
+ return gpus
161
+
162
+ def get_gpu_info(self, gpu_id: Optional[int] = None) -> Optional[GPUInfo]:
163
+ """Get information for a specific GPU or best available GPU"""
164
+ if not self.gpus:
165
+ return None
166
+
167
+ if gpu_id is not None:
168
+ for gpu in self.gpus:
169
+ if gpu.gpu_id == gpu_id:
170
+ return gpu
171
+ return None
172
+
173
+ # Return GPU with most free memory
174
+ return max(self.gpus, key=lambda x: x.memory_free)
175
+
176
+ def get_best_gpu(self, min_memory_mb: int = 1024) -> Optional[GPUInfo]:
177
+ """Get the best available GPU for model deployment"""
178
+ available_gpus = [gpu for gpu in self.gpus if gpu.memory_free >= min_memory_mb]
179
+
180
+ if not available_gpus:
181
+ return None
182
+
183
+ # Sort by free memory (descending) and utilization (ascending)
184
+ return sorted(available_gpus,
185
+ key=lambda x: (-x.memory_free, x.utilization))[0]
186
+
187
+ def estimate_model_memory(self, model_id: str, precision: str = "float16") -> int:
188
+ """Estimate memory requirements for a model in MB"""
189
+ # Simple estimation based on model name and precision
190
+ memory_multipliers = {
191
+ "float32": 4,
192
+ "float16": 2,
193
+ "int8": 1,
194
+ "int4": 0.5
195
+ }
196
+
197
+ multiplier = memory_multipliers.get(precision, 2)
198
+
199
+ # Rough parameter estimates based on model names
200
+ if "7b" in model_id.lower():
201
+ params = 7_000_000_000
202
+ elif "13b" in model_id.lower():
203
+ params = 13_000_000_000
204
+ elif "70b" in model_id.lower():
205
+ params = 70_000_000_000
206
+ elif "large" in model_id.lower():
207
+ params = 1_000_000_000
208
+ elif "medium" in model_id.lower():
209
+ params = 350_000_000
210
+ elif "small" in model_id.lower():
211
+ params = 125_000_000
212
+ else:
213
+ params = 500_000_000 # Default estimate
214
+
215
+ # Memory = parameters * bytes_per_param + overhead
216
+ estimated_mb = int((params * multiplier + 1024**3) / (1024**2)) # +1GB overhead
217
+
218
+ return estimated_mb
219
+
220
+ def check_gpu_compatibility(self, model_id: str, precision: str = "float16") -> Tuple[bool, List[str]]:
221
+ """Check if local GPUs can handle the model"""
222
+ warnings = []
223
+
224
+ if not self.gpus:
225
+ return False, ["No CUDA-capable GPUs detected"]
226
+
227
+ estimated_memory = self.estimate_model_memory(model_id, precision)
228
+ best_gpu = self.get_best_gpu(estimated_memory)
229
+
230
+ if not best_gpu:
231
+ warnings.append(f"Insufficient GPU memory. Required: {estimated_memory}MB, Available: {max(gpu.memory_free for gpu in self.gpus)}MB")
232
+ return False, warnings
233
+
234
+ # Check compute capability for advanced features
235
+ if precision in ["int8", "int4"]:
236
+ warnings.append("Quantized precision may require specific GPU compute capability")
237
+
238
+ return True, warnings
239
+
240
+ def refresh(self):
241
+ """Refresh GPU information"""
242
+ if self.nvidia_smi_available:
243
+ self.gpus = self._detect_nvidia_gpus()
244
+ elif self.cuda_available:
245
+ self.gpus = self._detect_cuda_gpus_fallback()
246
+
247
+ def get_system_info(self) -> Dict[str, Any]:
248
+ """Get comprehensive system information"""
249
+ info = {
250
+ "platform": platform.system(),
251
+ "architecture": platform.machine(),
252
+ "cuda_available": self.cuda_available,
253
+ "nvidia_smi_available": self.nvidia_smi_available,
254
+ "gpu_count": len(self.gpus),
255
+ "gpus": [
256
+ {
257
+ "id": gpu.gpu_id,
258
+ "name": gpu.name,
259
+ "memory_total_mb": gpu.memory_total,
260
+ "memory_free_mb": gpu.memory_free,
261
+ "memory_used_mb": gpu.memory_used,
262
+ "utilization_percent": gpu.utilization,
263
+ "temperature_c": gpu.temperature,
264
+ "power_draw_w": gpu.power_draw,
265
+ "driver_version": gpu.driver_version,
266
+ "cuda_version": gpu.cuda_version
267
+ }
268
+ for gpu in self.gpus
269
+ ]
270
+ }
271
+
272
+ # Add Python environment info
273
+ try:
274
+ import torch
275
+ info["torch_version"] = torch.__version__
276
+ info["torch_cuda_version"] = torch.version.cuda
277
+ except ImportError:
278
+ pass
279
+
280
+ return info
281
+
282
+
283
+ # Global GPU manager instance
284
+ _gpu_manager = None
285
+
286
+ def get_gpu_manager() -> GPUManager:
287
+ """Get global GPU manager instance"""
288
+ global _gpu_manager
289
+ if _gpu_manager is None:
290
+ _gpu_manager = GPUManager()
291
+ return _gpu_manager
292
+
293
+
294
+ def detect_gpus() -> List[GPUInfo]:
295
+ """Convenience function to detect GPUs"""
296
+ return get_gpu_manager().gpus
297
+
298
+
299
+ def get_best_gpu(min_memory_mb: int = 1024) -> Optional[GPUInfo]:
300
+ """Convenience function to get best available GPU"""
301
+ return get_gpu_manager().get_best_gpu(min_memory_mb)
302
+
303
+
304
+ def check_cuda_availability() -> bool:
305
+ """Check if CUDA is available"""
306
+ return get_gpu_manager().cuda_available
307
+
308
+
309
+ def estimate_model_memory(model_id: str, precision: str = "float16") -> int:
310
+ """Estimate model memory requirements"""
311
+ return get_gpu_manager().estimate_model_memory(model_id, precision)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: isa_model
3
- Version: 0.3.91
3
+ Version: 0.4.3
4
4
  Summary: Unified AI model serving framework
5
5
  Author: isA_Model Contributors
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -10,33 +10,87 @@ Classifier: Programming Language :: Python :: 3
10
10
  Requires-Python: >=3.8
11
11
  Description-Content-Type: text/markdown
12
12
  Requires-Dist: fastapi>=0.95.0
13
- Requires-Dist: numpy>=1.20.0
14
- Requires-Dist: httpx>=0.23.0
15
- Requires-Dist: pydantic>=2.0.0
16
13
  Requires-Dist: uvicorn>=0.22.0
14
+ Requires-Dist: pydantic>=2.0.0
15
+ Requires-Dist: httpx>=0.23.0
17
16
  Requires-Dist: requests>=2.28.0
18
17
  Requires-Dist: aiohttp>=3.8.0
19
- Requires-Dist: transformers>=4.30.0
20
- Requires-Dist: langchain-core>=0.1.0
21
- Requires-Dist: huggingface-hub>=0.16.0
22
- Requires-Dist: kubernetes>=25.3.0
23
- Requires-Dist: mlflow>=2.4.0
24
- Requires-Dist: torch>=2.0.0
25
- Requires-Dist: openai>=1.10.0
26
- Requires-Dist: replicate>=0.23.0
27
18
  Requires-Dist: python-dotenv>=1.0.0
28
- Requires-Dist: ollama>=0.3.0
29
- Requires-Dist: runpod>=1.0.0
30
- Requires-Dist: boto3>=1.26.0
31
- Requires-Dist: google-cloud-storage>=2.7.0
32
- Requires-Dist: datasets>=2.10.0
33
- Requires-Dist: accelerate>=0.20.0
34
- Requires-Dist: bitsandbytes>=0.39.0
35
- Requires-Dist: peft>=0.4.0
36
- Requires-Dist: trl>=0.4.0
19
+ Requires-Dist: numpy>=1.20.0
37
20
  Requires-Dist: supabase>=2.0.0
38
- Requires-Dist: pgvector>=0.2.0
39
21
  Requires-Dist: psycopg2-binary>=2.9.0
22
+ Requires-Dist: asyncpg>=0.28.0
23
+ Requires-Dist: slowapi>=0.1.8
24
+ Requires-Dist: circuitbreaker>=1.3.2
25
+ Requires-Dist: structlog>=23.1.0
26
+ Requires-Dist: psutil>=5.9.0
27
+ Requires-Dist: redis>=4.5.0
28
+ Requires-Dist: tenacity>=8.2.0
29
+ Provides-Extra: cloud
30
+ Requires-Dist: openai>=1.10.0; extra == "cloud"
31
+ Requires-Dist: replicate>=0.23.0; extra == "cloud"
32
+ Requires-Dist: cerebras-cloud-sdk>=1.0.0; extra == "cloud"
33
+ Requires-Dist: modal>=0.63.0; extra == "cloud"
34
+ Requires-Dist: grpclib>=0.4.7; extra == "cloud"
35
+ Requires-Dist: python-logging-loki>=0.3.1; extra == "cloud"
36
+ Requires-Dist: huggingface-hub>=0.16.0; extra == "cloud"
37
+ Requires-Dist: docker>=6.0.0; extra == "cloud"
38
+ Requires-Dist: influxdb-client>=1.36.0; extra == "cloud"
39
+ Requires-Dist: tiktoken>=0.5.0; extra == "cloud"
40
+ Provides-Extra: local
41
+ Requires-Dist: torch>=2.0.0; extra == "local"
42
+ Requires-Dist: transformers>=4.30.0; extra == "local"
43
+ Requires-Dist: accelerate>=0.20.0; extra == "local"
44
+ Requires-Dist: huggingface-hub>=0.16.0; extra == "local"
45
+ Requires-Dist: safetensors>=0.4.1; extra == "local"
46
+ Requires-Dist: sentencepiece>=0.1.99; extra == "local"
47
+ Provides-Extra: training
48
+ Requires-Dist: datasets>=2.10.0; extra == "training"
49
+ Requires-Dist: peft>=0.4.0; extra == "training"
50
+ Requires-Dist: trl>=0.4.0; extra == "training"
51
+ Requires-Dist: bitsandbytes>=0.39.0; extra == "training"
52
+ Provides-Extra: audio
53
+ Requires-Dist: librosa>=0.10.1; extra == "audio"
54
+ Requires-Dist: soundfile>=0.12.1; extra == "audio"
55
+ Requires-Dist: numba>=0.57.0; extra == "audio"
56
+ Provides-Extra: vision
57
+ Requires-Dist: Pillow>=10.0.1; extra == "vision"
58
+ Requires-Dist: torchvision>=0.15.2; extra == "vision"
59
+ Provides-Extra: langchain
60
+ Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
61
+ Requires-Dist: langchain-openai>=0.0.2; extra == "langchain"
62
+ Provides-Extra: storage
63
+ Requires-Dist: boto3>=1.26.0; extra == "storage"
64
+ Requires-Dist: google-cloud-storage>=2.7.0; extra == "storage"
65
+ Provides-Extra: monitoring
66
+ Requires-Dist: mlflow>=2.4.0; extra == "monitoring"
67
+ Requires-Dist: redis>=4.5.0; extra == "monitoring"
68
+ Requires-Dist: prometheus-fastapi-instrumentator>=6.1.0; extra == "monitoring"
69
+ Requires-Dist: influxdb-client>=1.36.0; extra == "monitoring"
70
+ Requires-Dist: pgvector>=0.2.0; extra == "monitoring"
71
+ Requires-Dist: python-logging-loki>=0.3.1; extra == "monitoring"
72
+ Provides-Extra: k8s
73
+ Requires-Dist: kubernetes>=25.3.0; extra == "k8s"
74
+ Provides-Extra: gpu-cloud
75
+ Requires-Dist: runpod>=1.0.0; extra == "gpu-cloud"
76
+ Requires-Dist: ollama>=0.3.0; extra == "gpu-cloud"
77
+ Provides-Extra: dev
78
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
79
+ Requires-Dist: black>=22.0.0; extra == "dev"
80
+ Requires-Dist: flake8>=4.0.0; extra == "dev"
81
+ Requires-Dist: mypy>=0.991; extra == "dev"
82
+ Requires-Dist: twine>=4.0.0; extra == "dev"
83
+ Provides-Extra: api-only
84
+ Requires-Dist: isa-model[cloud,langchain]; extra == "api-only"
85
+ Provides-Extra: full-local
86
+ Requires-Dist: isa-model[audio,langchain,local,training,vision]; extra == "full-local"
87
+ Provides-Extra: production
88
+ Requires-Dist: isa-model[cloud,k8s,monitoring,storage]; extra == "production"
89
+ Provides-Extra: staging
90
+ Requires-Dist: isa-model[cloud,langchain,monitoring,storage]; extra == "staging"
91
+ Requires-Dist: python-consul>=1.1.0; extra == "staging"
92
+ Provides-Extra: all
93
+ Requires-Dist: isa-model[audio,cloud,gpu-cloud,k8s,langchain,local,monitoring,storage,training,vision]; extra == "all"
40
94
 
41
95
  # isa_model_sdk - Unified AI Model Serving Framework
42
96
 
@@ -0,0 +1,193 @@
1
+ isa_model/__init__.py,sha256=lYYKstKw33oavW6xS0-9cpsdYq-h0cfV_ZlGAwICRaU,868
2
+ isa_model/client.py,sha256=7OUA6yi0G94I8U4GOFcoXvCjWxk2ds1-3CDCivJXA6M,67628
3
+ isa_model/core/config.py,sha256=9OL8_EkBcnAH-RgyWUi3jblKo42m7K1JDeHa9C5CPL4,19519
4
+ isa_model/core/dependencies.py,sha256=2ZgGDjtYitBEVy8H3UppQSb_BId3--f2kQw-Lm4Umh8,10050
5
+ isa_model/core/pricing_manager.py,sha256=NWQLhNIzUDqS5_jBfVcJGrdOdRasFyifSNCliaIDvqU,17122
6
+ isa_model/core/types.py,sha256=jdO_q0FDuzvWURXZtxMV1Zj1XgARX9kopTviWFuq_FU,8713
7
+ isa_model/core/cache/redis_cache.py,sha256=J_A4OcVENsbc6RMOnXn6O-i320egM5hCQXTR7RlYz6s,14111
8
+ isa_model/core/config/__init__.py,sha256=SLeHQtYGDHl64NDVyb3ECQXOKepGM8YNHEoM8CVEWus,350
9
+ isa_model/core/config/config_manager.py,sha256=tF6EyNr_y6Jm0easV9aNHgBce4Ddamf0acaFlz7yToA,32289
10
+ isa_model/core/database/__init__.py,sha256=E2lp9te05QgdQfMeUq702t_23fv4Y7be_P2QU60Yqzs,18
11
+ isa_model/core/database/direct_db_client.py,sha256=jHp5AWyrXcYDRvrPvBRGH89FmPRAhgzL8MQsSt4zkTQ,4273
12
+ isa_model/core/database/migration_manager.py,sha256=GxSJtngsbK8oA8kAKkquLQby_DdXLTwU795NGGHMH8c,21748
13
+ isa_model/core/database/migrations.py,sha256=RpM1eqt7Chu736K0ij_42gKMYHg2HPR_qSt70xfJ_co,12626
14
+ isa_model/core/database/supabase_client.py,sha256=waY0VQLy9VM6FMIoViDe5yAgNW78qJaI3Jb2ohTNj98,11124
15
+ isa_model/core/discovery/__init__.py,sha256=U7YzSNqsyPYmT_TdMlLy9QMAotdfaFlDE-c9XgKk8-4,380
16
+ isa_model/core/discovery/consul_discovery.py,sha256=UziTVGVbejh0zUvayhISkiRJ5KeFcxUkw8t4gTK0UVw,6631
17
+ isa_model/core/logging/__init__.py,sha256=9PA5MJvn7y73aCUUqCgv5r2it2nNb38YXSG31oxNIDA,1213
18
+ isa_model/core/logging/influx_logger.py,sha256=TsPnWeKgV6pl2cz9NoqM0OV9z9jI1_uVbn6nTblfM94,19483
19
+ isa_model/core/logging/loki_logger.py,sha256=pFkKFK5ouKNa9dPehC_kV6af0urnAvzfvbYE5IFiwD0,4706
20
+ isa_model/core/models/__init__.py,sha256=bDzyE0KHIJxxoN3q08pvW_hHBeHux2aMdeKY4GlDzmU,1286
21
+ isa_model/core/models/config_models.py,sha256=Gy0oNndDsKVQ92Bz6aZp1JMqr4Z0jdoEJCCscIrpogI,22955
22
+ isa_model/core/models/deployment_billing_tracker.py,sha256=hW2e3vUkASvCycYhBdrZcsEtBjYo3TLTVpfwfVkaXnQ,16406
23
+ isa_model/core/models/model_billing_tracker.py,sha256=er35dsoKAGt8bjkQwO9f3MQ6U_NI6OIuhIn4PEOPEWU,17302
24
+ isa_model/core/models/model_manager.py,sha256=vjFYWxmhRGUDlrHkwySjN5d0hfCx-VqBKiMhgTXjs8Y,17093
25
+ isa_model/core/models/model_metadata.py,sha256=C6ubW12qmXAuqKmE_2BaO4HMB7WJqBkYDVXYCINsc-4,25148
26
+ isa_model/core/models/model_repo.py,sha256=1018Qi8fMfgXtU8DKfWvf-0hBE16Q7wJIzmEZa7x6bw,19868
27
+ isa_model/core/models/model_statistics_tracker.py,sha256=4KoKawwtEDAx8FV9ysmZS4nvRqZAgRSSIa-32f_Jhwk,10561
28
+ isa_model/core/models/model_storage.py,sha256=gpW7R_wDQh0WUo4CYkrQen9GMKn8Z8ys5iGQenaMmCM,4473
29
+ isa_model/core/models/model_version_manager.py,sha256=20BwNbCg1NlcmHmCxK_zMvpPmVFHg0B6ZCFnPLY6Yj8,37563
30
+ isa_model/core/models/system_models.py,sha256=I52nTi0UVft8tkJdb2LZrJ_Qxax-JE00_YKqnSa-P4E,32525
31
+ isa_model/core/repositories/__init__.py,sha256=RRERY7mWZxhSAZa4m6493l6sFl3CPlyL2bW6qJMEzD8,172
32
+ isa_model/core/repositories/config_repository.py,sha256=QlL22r_bGEV6mHfmztEIY5Zw3wIFoiR5IQJyIj36wXU,37428
33
+ isa_model/core/resilience/circuit_breaker.py,sha256=Ccoh3O31xVFJO2A0flnc9SI-sRqQ3sGKbwv3WbgJxBc,12435
34
+ isa_model/core/security/secrets.py,sha256=kzRjpSiGwY9z47NUlurK29uY_uMsA5lqk8_6Ywu8Zvw,13319
35
+ isa_model/core/services/__init__.py,sha256=TEE58Vk8JKIaQx8ELeAaWo-WPz0hjck9x-ZK7pbfiIE,422
36
+ isa_model/core/services/intelligent_model_selector.py,sha256=PPUWiMcV8DkCPMHhnIlsBgksUY8hKB4SjlFDW1zhLYY,29205
37
+ isa_model/core/storage/hf_storage.py,sha256=k271Rg5G7qUJAJ6VXQBTUHGU6y2NYBNWKVeBJm02DRo,14736
38
+ isa_model/core/storage/local_storage.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
+ isa_model/deployment/__init__.py,sha256=Y3IUEOriJYVZ-3ZEamMs4n6_X0OwtD2eguwBas5zgtg,345
40
+ isa_model/deployment/core/__init__.py,sha256=TRJ4tNjNFub_ObhZy61iZZpqC0CYsnv1HV1Qp_XWhVI,119
41
+ isa_model/deployment/core/deployment_manager.py,sha256=In2e5EuXwVJfg6ENjigOrgQyy19DCWX5uuwSa--Czzc,58337
42
+ isa_model/deployment/local/__init__.py,sha256=Ld1QbaDHIHnbW2IkSXVTZeDcxnmUXBa074uOSLRu5t0,904
43
+ isa_model/deployment/local/config.py,sha256=Kft5EORBcsO2HVizD0ct6VFIIs9sVBN-CjRnOrcm00g,9246
44
+ isa_model/deployment/local/gpu_gateway.py,sha256=be6d9eSWRufXvJH9GyklBWlXhOukITY1lnXTM6RPcQs,21954
45
+ isa_model/deployment/local/health_checker.py,sha256=_u2vwiwEGCbFA6laUu1JX6GfE6prrOSHiy6PclimGys,16392
46
+ isa_model/deployment/local/provider.py,sha256=6E1WfTUvI32aeEQs13TIyuy9xQmZqJeaJULfE2KLe4E,22763
47
+ isa_model/deployment/local/tensorrt_service.py,sha256=f05BkJMw2NhiMp18xW1RwRED4bIjZ0gmUS5OgEAGnk0,23026
48
+ isa_model/deployment/local/transformers_service.py,sha256=pdC3KppUzSVrWd-CKA8fXPC1uzy45S8FTtQj9odAWpM,23937
49
+ isa_model/deployment/local/vllm_service.py,sha256=zVuBopgzG6ulSvHnRE8h_dLQQpNqTDwHbXo88IKXrwk,18849
50
+ isa_model/deployment/modal/__init__.py,sha256=ZBcToGNtL6ztWY5pvqM1YMiL_F-S1xx9b-uZd8cuajc,380
51
+ isa_model/deployment/modal/config.py,sha256=8XhBMIbx6oDTf-P9ipQ58xmBYDbNZekZ4gixorBDIpw,4267
52
+ isa_model/deployment/modal/deployer.py,sha256=YNCtbO8FTVstz8OG6Kh8p3AM05dtbg5i73-JsuNy4KM,31961
53
+ isa_model/deployment/modal/services/__init__.py,sha256=m9D6jZ-RH3fohn5pNDLEfFQWj18LDlq565I2t8tTIAk,61
54
+ isa_model/deployment/modal/services/audio/__init__.py,sha256=YhBTWmI0k8onSU6K0MzW9NIS1d7uedPT_9U6G0Qmfio,41
55
+ isa_model/deployment/modal/services/audio/isa_audio_chatTTS_service.py,sha256=w3s4hj78HedQ0g2X8_PJbXPBGcMmwnZeV1LHS_Auy_o,18637
56
+ isa_model/deployment/modal/services/audio/isa_audio_fish_service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
+ isa_model/deployment/modal/services/audio/isa_audio_openvoice_service.py,sha256=2OE_J5KTglEh7iVnTb-2_phghvQKkTD7OIsHZ9fKfZI,33515
58
+ isa_model/deployment/modal/services/audio/isa_audio_service_v2.py,sha256=TMF-TXKcRsNT6vq6U-45PSvKfdJ-SBbpAD-lCC9x_zI,40832
59
+ isa_model/deployment/modal/services/embedding/__init__.py,sha256=uwKfvNrVTO_AvRKlONGCVaXwmSIs-lDNfF2gef_Clb0,45
60
+ isa_model/deployment/modal/services/embedding/isa_embed_rerank_service.py,sha256=K6TdCWD-Ko-vmKi03tVfpjZpX2Folv5EW79yPqJzT_U,10182
61
+ isa_model/deployment/modal/services/llm/__init__.py,sha256=dDp1ekrBb6E1cMwpE4kMFswlIxfs5G0M_LuTLvCAtKk,39
62
+ isa_model/deployment/modal/services/llm/isa_llm_service.py,sha256=-GVcBMRiKezT0oGkqirmwuKb0Oo2GsMrL-AFEwp5Ik8,14108
63
+ isa_model/deployment/modal/services/video/__init__.py,sha256=IehlRWhB0X-IOY1-rGXugY-BzOLr1jhMPQTLAZZTj_c,41
64
+ isa_model/deployment/modal/services/video/isa_video_hunyuan_service.py,sha256=slxEZxFFnFkOBlxdOdNu7JRXJMWwl-gaOUHFQr5stZ0,15208
65
+ isa_model/deployment/modal/services/vision/__init__.py,sha256=JzkcYOTBIJ4vUUpZwwjYCpzyh1VtUOa-RSlymOzKdHU,42
66
+ isa_model/deployment/modal/services/vision/isa_vision_ocr_service.py,sha256=1Y6s6mLRFLPhpItFLS61mbqGggR1UNd1rNtAluIzQrk,18501
67
+ isa_model/deployment/modal/services/vision/isa_vision_qwen25_service.py,sha256=Ldy0VvO7CGiPGDmPXWQCbCLUZgCGg3aBqWOA66Lvt5I,26797
68
+ isa_model/deployment/modal/services/vision/isa_vision_table_service.py,sha256=UhQinNRda0b11g3dYFjDCNaR0850IgCl1WtRghrFNu0,24827
69
+ isa_model/deployment/modal/services/vision/isa_vision_ui_service.py,sha256=BwoMhJQiQe2vGFteTsbbeVsemJZszjce9ech39Z0cWQ,34296
70
+ isa_model/deployment/modal/services/vision/isa_vision_ui_service_optimized.py,sha256=xy3IOEDifi2aMvJFB2_u4qfdD3YdXfgWW3_0z_BLNuo,25665
71
+ isa_model/deployment/modal/services/vision/simple_auto_deploy_vision_service.py,sha256=rfXsv9mh_w5cXHVYxA4fBD5ppyNY4HplsH34xp4WpY8,9882
72
+ isa_model/deployment/models/org-org-acme-corp-tenant-a-service-llm-20250825-225822/tenant-a-service_modal_service.py,sha256=3MHnvm6TFDycULcFaEdX95Rl0jY2VWYHDGzjDSJNCm0,1388
73
+ isa_model/deployment/models/org-test-org-123-prefix-test-service-llm-20250825-225822/prefix-test-service_modal_service.py,sha256=IfmIal7OfSdbnGeyGy-zMee2WAf5zteXJ0zAZiCZxSQ,1400
74
+ isa_model/deployment/models/test-llm-service-llm-20250825-204442/test-llm-service_modal_service.py,sha256=nQEhzFDU2dsAQkHApyeQpZHu0VLWtG3Ilhuv498wRLA,1388
75
+ isa_model/deployment/models/test-monitoring-gpt2-llm-20250825-212906/test-monitoring-gpt2_modal_service.py,sha256=yx3xiXyzskiVjwdr54favQ48UYO3hXzt2bQM9iR_irM,1404
76
+ isa_model/deployment/models/test-monitoring-gpt2-llm-20250825-213009/test-monitoring-gpt2_modal_service.py,sha256=fjPAVAtdcxOnEA252E4KPjTNkJq-_4UlG9Qj7eEF6tw,1404
77
+ isa_model/deployment/storage/__init__.py,sha256=TPxs4prCYb2AJ9NqNk9nh3kc6EFDkAkDmrqxq1ERWzo,138
78
+ isa_model/deployment/storage/deployment_repository.py,sha256=F6eFQjDXL4AAhw6F1hDMiU1rlnCL1zhZ_cMssVVEtHY,33168
79
+ isa_model/deployment/triton/__init__.py,sha256=TrsBOxzGeESj_GrVWUd3jsScFUQ5Cd266NXvwRbuAJ8,330
80
+ isa_model/deployment/triton/config.py,sha256=H7VemDvdLpREfSvD0DK86CXFg46l-eHnGf_vo8lOrH4,7319
81
+ isa_model/deployment/triton/provider.py,sha256=ZtpgF2kaHGtPO2EuXQEHMtwobMW025sliogkBtqjbe0,17391
82
+ isa_model/deployment/triton/configs/__init__.py,sha256=bxiam68sNO8eFutXKK9yaaKS-5MulIuhgusN_mdwz2A,50
83
+ isa_model/deployment/triton/scripts/__init__.py,sha256=fE3HxpLG9_wvXWIN27Tj-B9IEvtp_aZ0bUS3GzfRHqY,31
84
+ isa_model/deployment/triton/templates/__init__.py,sha256=rWtBQzM6kpC2yXcc3yCjrnWSj7W3jxbfXXZe2Rr1GL8,33
85
+ isa_model/inference/__init__.py,sha256=gmrJV1cdSyDpBZdfm8r0kPZsbnqogth0rXf_wT5fIFY,1381
86
+ isa_model/inference/ai_factory.py,sha256=ztTllV58ovfuO208aYQA_yT7iq88F7wdiPZr1TvW1_I,28716
87
+ isa_model/inference/base.py,sha256=qwOddnSGI0GUdD6qIdGBPQpkW7UjU3Y-zaZvu70B4WA,1278
88
+ isa_model/inference/legacy_services/__init__.py,sha256=H0RTKKE3UOqmpjc3S3GfysbhZZl6CnZd9_I38KTXg1E,563
89
+ isa_model/inference/legacy_services/model_evaluation.py,sha256=GbhcNM8uO0AnI59yuCYaTqDEdmh0pS4YxJVgJGL8Vjs,27964
90
+ isa_model/inference/legacy_services/model_service.py,sha256=9xEaLJWW1B2lLFL5-eP_uPFpfg8iYnqrAphpJnMTn2A,24751
91
+ isa_model/inference/legacy_services/model_serving.py,sha256=XQ7j6B02MsjUWKeeSVovKg0kljwMCLbRLeCuckmjtM8,28255
92
+ isa_model/inference/legacy_services/model_training.py,sha256=g0rfzSKGXzoJbNgEh8wDJlfdhHxh6-jXN0fv_B3-1C8,24036
93
+ isa_model/inference/models/__init__.py,sha256=FJ6goyHRf4RCnqbq75qAigL0FMKXulDOns-ebHWCgP8,579
94
+ isa_model/inference/models/inference_config.py,sha256=1ITGWOtQ3cVyucQq9Rih-Ab5uqaAGf31UfCYyJMY_DI,19529
95
+ isa_model/inference/models/inference_record.py,sha256=oHidCa9-lHSonOSoc24tAbrsSPBgm3bb8-cqzWOqzcU,24840
96
+ isa_model/inference/models/performance_models.py,sha256=KZWC8fEslhTohL2y-nz8S39P9RZ9SgJ6piQ9pMXh04E,26434
97
+ isa_model/inference/repositories/__init__.py,sha256=SYTQX1E5L6zTuo_p_KnDjYefoCKw4p1m4pW_FDb_sgM,191
98
+ isa_model/inference/repositories/inference_repository.py,sha256=QnfSzkcLQ5CPcABTmSYBRAv_5SVk0ayjVW6B1Q0SKaQ,31718
99
+ isa_model/inference/services/__init__.py,sha256=yfLz0YGl8ixk6LfTRL6cRTvZMb9F_Pv1QRgGyNc9xYM,386
100
+ isa_model/inference/services/base_service.py,sha256=NJIvq7YpGw55ah-axDR2hcu40B2gm6L_WYXyfX0rSaE,5816
101
+ isa_model/inference/services/custom_model_manager.py,sha256=HUHSDOWArJYMfdvaI-gfCJkVRVFdftScOw7BgS-h3zo,10829
102
+ isa_model/inference/services/audio/__init__.py,sha256=Hgtk3j5H4U3YxNlfG8UaU2eUNOWgrpSA8LN_tKEFWMk,616
103
+ isa_model/inference/services/audio/base_realtime_service.py,sha256=hSP89_hnzLBnmBvFOQlU_tW8UT2QKWKVR9Z7fwsVPa8,8125
104
+ isa_model/inference/services/audio/base_stt_service.py,sha256=qahYTLpf8gruvhEtS5bWDXPiYbgxXF3nYnqTq3Ckc0E,13361
105
+ isa_model/inference/services/audio/base_tts_service.py,sha256=PgctcV98Pe9I2kSjScsm8epRwdaEU-vAGCIfdd2P8us,6924
106
+ isa_model/inference/services/audio/isa_tts_service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
+ isa_model/inference/services/audio/openai_realtime_service.py,sha256=vo4ow8CULZJXz4nSepMTq7_uKufWvRmcoezhmX2Q16s,22101
108
+ isa_model/inference/services/audio/openai_stt_service.py,sha256=2UBBrRP8PXYTlDz9gEh4_mOqTSIdCewG8Ptu9aT2nCo,13476
109
+ isa_model/inference/services/audio/openai_tts_service.py,sha256=C4vIRvCKoySs4-zBEteI_DZYZsATS84W_ZUwbxjJjpA,8253
110
+ isa_model/inference/services/audio/replicate_tts_service.py,sha256=kCG_bBNgW7GQwt5-ZdwPSqsMiTV54-FhSowFwNWGvg0,10292
111
+ isa_model/inference/services/embedding/__init__.py,sha256=xeWeq3jighDBCUzgveTiH11VLkkhk-J6z5cq9sf1mEk,311
112
+ isa_model/inference/services/embedding/base_embed_service.py,sha256=V57nDU_VzWXjw3dqyaTXBr3ntxT2VI1my6uSAX-vvxY,10382
113
+ isa_model/inference/services/embedding/isa_embed_service.py,sha256=AQ3yuGas64SRW8jlB0rvXhq2cyD5NMlCekodPCuN8dw,11242
114
+ isa_model/inference/services/embedding/ollama_embed_service.py,sha256=7OZMMrDO4eePNJXSjNB5E4j0rtX0HVq3RgNSzzqU1nA,7291
115
+ isa_model/inference/services/embedding/openai_embed_service.py,sha256=CaoNtepIreMA0wo5i0lUgJHUjVp4vdHQ59eT_gan3s4,8321
116
+ isa_model/inference/services/embedding/resilient_embed_service.py,sha256=26HPaWmVKQ_fPClTNew1VZeAX5vy4ncKxp1HR04yAYw,11735
117
+ isa_model/inference/services/embedding/helpers/text_splitter.py,sha256=6AbvcQ7H6MS54B9d9T1XBGg4GhvmKfZqp00lKp9pF-U,1635
118
+ isa_model/inference/services/embedding/tests/test_embedding.py,sha256=_Syrgt2sYCS8oNCqaJMuzck_FRqeSx0Nnk9B1j3OJBk,10200
119
+ isa_model/inference/services/img/__init__.py,sha256=moVvATbOEEqzKRtu2A9E7eBzlrkbr5oY1bGyH_3PebY,577
120
+ isa_model/inference/services/img/base_image_gen_service.py,sha256=3BYoUo9ASw02ZPl2T9Pwvu4uVD-GOZIFEaGsrnuKCrM,8101
121
+ isa_model/inference/services/img/replicate_image_gen_service.py,sha256=mspkdRh_snMUPQxRccpfzcAXO3TAxZsNzei0c45G7YA,6447
122
+ isa_model/inference/services/img/services/replicate_face_swap.py,sha256=Q6SiWJN9eNvD1nv4kWXnvvPnm9A1DLb7Gsb_vwUfUJw,7385
123
+ isa_model/inference/services/img/services/replicate_flux.py,sha256=BUIkuBUMZCH5ChvbIhmJ_1pJVNo0CjY7q7hgvsaFJO0,8008
124
+ isa_model/inference/services/img/services/replicate_flux_kontext.py,sha256=3DEwruobN7JL6-3LNMOJVOtorjlqV7ykD2ul4NTQ9Fs,7786
125
+ isa_model/inference/services/img/services/replicate_sticker_maker.py,sha256=9D_IISOpFfC2MWlP1BFohuIwHcI1H_b95zQU52Nl-Mw,8528
126
+ isa_model/inference/services/img/tests/test_img_client.py,sha256=r6lYybP_ty3A55LoaE_GRuXvXSh35KXOVbODGskLza0,11313
127
+ isa_model/inference/services/llm/__init__.py,sha256=aiNdB692nopCy8QaopVDB0e-J7mg22LrRzk4ytlu2iQ,769
128
+ isa_model/inference/services/llm/base_llm_service.py,sha256=CUw24rMytVXAUcberTzogKRLwYZiYifyg-kcNfHiHkg,36402
129
+ isa_model/inference/services/llm/cerebras_llm_service.py,sha256=8BU9I7HHO481nn7ddsiP4nl2ItYTCQJzJyaIArKA0ZA,25126
130
+ isa_model/inference/services/llm/huggingface_llm_service.py,sha256=mWnOGh3OsRyaL002Ax71Mb7oXp254VDDdP0QiQ-p9Yk,22733
131
+ isa_model/inference/services/llm/local_llm_service.py,sha256=_ILRD-oKcolf972aXe3zPS_tBu8SD-xH_Iw29alpkHM,27606
132
+ isa_model/inference/services/llm/ollama_llm_service.py,sha256=78VNSspzlQrXDqAxUR52jLGIKnBw4e_4LT2unAFMiTk,17967
133
+ isa_model/inference/services/llm/openai_llm_service.py,sha256=BpYugS2Vsrc-SS69cnW2VqFv4JXMbgglXvvbNgUZNZY,43874
134
+ isa_model/inference/services/llm/yyds_llm_service.py,sha256=ZHl2ukcDVkwYahF4OV5etTvJKa9Ni6O1TkJp75pQWaA,12495
135
+ isa_model/inference/services/llm/helpers/llm_adapter.py,sha256=7PrpiKvZaMfI9U6wabfTegwDMKcGDsv6I_lqnzcsE-o,24392
136
+ isa_model/inference/services/llm/helpers/llm_prompts.py,sha256=qGcG5hiBcnuq3IrcpNvshpWR1TqUrkdtf2Il__xeBoo,21661
137
+ isa_model/inference/services/llm/helpers/llm_utils.py,sha256=x2-wbij95bWgrZpJyXah9uMhEHKYAznChYRldT0VVno,22776
138
+ isa_model/inference/services/ml/base_ml_service.py,sha256=mLBA6ENowa3KVzNqHyhWxf_Pr-cJJj84lDE4TniPzYI,2894
139
+ isa_model/inference/services/ml/sklearn_ml_service.py,sha256=Lf9JrwvI25lca7JBbjB_e66eAUtXFbwxZ3Hs13dVGkA,5512
140
+ isa_model/inference/services/vision/__init__.py,sha256=1GO2NoC7p8IJ92mI6fGcPaN4MeFzLhdNdNlAnFYpzpE,1839
141
+ isa_model/inference/services/vision/base_vision_service.py,sha256=mjrfcUT01HBi0k1qeIL3CkpkvQIuL_jar-N03W8sMV8,10531
142
+ isa_model/inference/services/vision/blip_vision_service.py,sha256=tmGCznQ9qBsidLV_mnKEtvpSUPvBUbwJdwviKYXrrkA,12020
143
+ isa_model/inference/services/vision/isa_vision_service.py,sha256=OPuIZmG_lYOgajGfrQj4uLzVk5Y4H0PkeSNViIiL1O0,22960
144
+ isa_model/inference/services/vision/openai_vision_service.py,sha256=LeD910WWyJd6QiJncSM3x_Whj-a32Vr1_2FG4gfjtc4,10179
145
+ isa_model/inference/services/vision/replicate_vision_service.py,sha256=smRkSCTwk5mvyKVnvyplqPNuVYjRZngVBWxTCbFmrxA,20679
146
+ isa_model/inference/services/vision/vgg16_vision_service.py,sha256=5w9r3vXQz5EAdXFPawtsuWzaNlhFA2N0xcJxSJcudQI,9382
147
+ isa_model/inference/services/vision/disabled/isA_vision_service.py,sha256=VYa8VJtxDB9KdnfNW0GPEP_TPker4pHp33gLD_TnpaM,18336
148
+ isa_model/inference/services/vision/helpers/image_utils.py,sha256=BYEFnOu2MBRJrJmKdALfFy5CTKpI4Co9PTVCxJvdFqc,11388
149
+ isa_model/inference/services/vision/helpers/vision_prompts.py,sha256=WbzOYu-Z2-8Xn9dcvuPRTA7VTy23_uoMRRGO4t0wZ8Q,12098
150
+ isa_model/inference/services/vision/tests/test_ocr_client.py,sha256=IY2KbHuIf1FmKFrUO9HrmKtgyT9achylwKykOIFLR8E,11250
151
+ isa_model/inference/utils/conversion/bge_rerank_convert.py,sha256=1dvtxe5-PPCe2Au6SO8F2XaD-xdIoeA4zDTcid2L9FU,2691
152
+ isa_model/inference/utils/conversion/onnx_converter.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
153
+ isa_model/inference/utils/conversion/torch_converter.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
154
+ isa_model/serving/__init__.py,sha256=LTO0Adbvm7A-bgQqtuOQSoHvdu9OH3OrEjYgQanuHgI,429
155
+ isa_model/serving/modal_proxy_server.py,sha256=U8AJMF4ewtTGHjmbLb6ezR3NCT6d0APBtFuKVxVkRu4,7481
156
+ isa_model/serving/api/__init__.py,sha256=wgWD69eqV37fFTLxhz8b0rOn_34P7SZHoWw2sufWjk4,162
157
+ isa_model/serving/api/cache_manager.py,sha256=pBA9-4OUrHlyqYGtNbJSfZrDYPfEs2DV1Cx1qI0pM6U,8120
158
+ isa_model/serving/api/error_handlers.py,sha256=UigiYCu7O59Mp-GkB3grzMgAz5rl9ClgK81DyEzX6ZU,10869
159
+ isa_model/serving/api/fastapi_server.py,sha256=huSO9ZMuFirr5LhQO__mfM0tq1qKik11Wid9Qzk6T-Y,12367
160
+ isa_model/serving/api/startup.py,sha256=iZqRnkgBFvuMYkueeVxKheZZ13Hy5xoaeenX2udrPW8,12944
161
+ isa_model/serving/api/dependencies/__init__.py,sha256=e9ho7V27vnK73k2R7uRqVFzJ9hOHOsEydSz5mOAQbQU,21
162
+ isa_model/serving/api/dependencies/auth.py,sha256=6G46JMx35O_9PWhc66ptA67BTH3fb9ASgdOW-dKfK0g,6149
163
+ isa_model/serving/api/dependencies/database.py,sha256=fh8nrLNuD2ATVHnaMOxGD8ueR2g1f54rgflM1ISqcWg,4145
164
+ isa_model/serving/api/middleware/__init__.py,sha256=iCKUYECf0bjNGXgV91K03hb8Dnp0Jc_wnUL897Rd0sg,163
165
+ isa_model/serving/api/middleware/auth.py,sha256=WRoRrsDTlf4FDa7E8PnNhY5qfhUn76Be3ZMOPdi3FMk,11313
166
+ isa_model/serving/api/middleware/request_logger.py,sha256=d48n6tp1pqZ7HFWFl8jg6er24ugWkWkMOc1y80aqPU8,2938
167
+ isa_model/serving/api/middleware/security.py,sha256=YBzP3BZtEM1-PLSvVEuyTIxwGJqtw0IioRFWPUSu8FA,10233
168
+ isa_model/serving/api/middleware/tenant_context.py,sha256=uf2Lla2aov-vIOXCIukBURn90GJ3G484tbqj993NktI,16008
169
+ isa_model/serving/api/routes/__init__.py,sha256=RIaG9OPg0AjAIVbtMzwnqGyNU-tuQXbdvFcYOt4b_Do,84
170
+ isa_model/serving/api/routes/analytics.py,sha256=qUVo1SV-wNJZPyvVx_w80gL6JYuiL3DbyEahEZGJIVU,17655
171
+ isa_model/serving/api/routes/config.py,sha256=ER2PiKExoctMLkxs9ZxihGB0rEiczgU2Zt-FxpzMPsY,22453
172
+ isa_model/serving/api/routes/deployment_billing.py,sha256=-9Ut6FIexwXbL_wT6oG-6yRxJLvCTXMBThiJn3av1B0,12350
173
+ isa_model/serving/api/routes/deployments.py,sha256=DQHCePARLy1xht7nmeGlfomdUhWDqBzeAwReSI0arCc,17536
174
+ isa_model/serving/api/routes/gpu_gateway.py,sha256=cTZmOApxinMqSQe1W9nglx3UduUnC-wRJ311bEajSV0,15512
175
+ isa_model/serving/api/routes/health.py,sha256=dqmTLF_x0AvEdXHPYd9mf4mqUN-Z5oziNW_7yMI735s,2974
176
+ isa_model/serving/api/routes/inference_monitoring.py,sha256=yXLQApZv5kDeTQjQAduKyv30k36AGl7tQ9ifG-wn21I,18799
177
+ isa_model/serving/api/routes/llm.py,sha256=5ZVxWugff0i6VBKz_Nv5CqacMZJsPZEKyoSB6XDrW34,385
178
+ isa_model/serving/api/routes/local_deployments.py,sha256=LbAiRcozooyhckg4joQXCWjpX2Au8Wt-MMq-GLZHul0,16289
179
+ isa_model/serving/api/routes/logs.py,sha256=9t8cft3fprpQHHCj8UNxvcHmvOiELxbu7WXoWe8JLPw,14238
180
+ isa_model/serving/api/routes/settings.py,sha256=Xj_uXnRxmHpgSxUfztvrwE2yjWtlWQElE2CizmeeVds,20905
181
+ isa_model/serving/api/routes/tenants.py,sha256=7gU7xpEjYuDeCunWWeY6BIwuEw-t3_ctqYDU5Sv3GBI,21000
182
+ isa_model/serving/api/routes/ui_analysis.py,sha256=-WxLaRKQNHnRh4okB85cWA4blTegpEPZtzHTsF3yeeU,6848
183
+ isa_model/serving/api/routes/unified.py,sha256=rKCHKU4accmnE2jdZw-ZVSN8hDh8vB0a1Q-8U35faQM,44294
184
+ isa_model/serving/api/routes/vision.py,sha256=U9jxssQYe6igtayUW0C2fcYwqmLRIE15__X-5Ru9J4c,396
185
+ isa_model/serving/api/routes/webhooks.py,sha256=kspHgX8PIZ5L6S0klnV0XtGoE9BiTfYTMMx7Qsuf6CY,16219
186
+ isa_model/serving/api/schemas/__init__.py,sha256=Tu_hzxoKW1ZHpww3-5ER4A2hNuDByZ0rAfrgaJ7Bs-M,275
187
+ isa_model/serving/api/schemas/common.py,sha256=HVaAS7wlvqrwC1gMZ2Cvo0vzHB053x2uOTAwUoY2vsE,696
188
+ isa_model/serving/api/schemas/ui_analysis.py,sha256=IpOcIvmUeXN1UtZsbGozMfV1vvz7AVF2PVXjjxYl_0k,4089
189
+ isa_model/utils/gpu_utils.py,sha256=HbMvJzSsOCcjOJluUrszAJ58dC8LPnyA_nQn9s_1I6c,11730
190
+ isa_model-0.4.3.dist-info/METADATA,sha256=2xHn4pAvo10QKBDQK34v0-acBWGBUZRR6ZUZa-xq7BU,15090
191
+ isa_model-0.4.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
192
+ isa_model-0.4.3.dist-info/top_level.txt,sha256=eHSy_Xb3kNkh2kK11mi1mZh0Wz91AQ5b8k2KFYO-rE8,10
193
+ isa_model-0.4.3.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- """
2
- Cloud Deployment Module
3
-
4
- Support for various cloud platforms
5
- """
6
-
7
- from .modal import ModalDeployment
8
-
9
- __all__ = ["ModalDeployment"]
@@ -1,10 +0,0 @@
1
- """
2
- Modal Deployment Module
3
-
4
- Modal.com cloud deployment for ISA Model services
5
- """
6
-
7
- from .ui_analysis_service import UIAnalysisService as UIAnalysisModalService
8
- from .deployment_manager import ModalDeployment
9
-
10
- __all__ = ["UIAnalysisModalService", "ModalDeployment"]