indexify 0.4.28__tar.gz → 0.4.29__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.
- {indexify-0.4.28 → indexify-0.4.29}/PKG-INFO +1 -1
- {indexify-0.4.28 → indexify-0.4.29}/pyproject.toml +1 -1
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/executor.py +11 -7
- indexify-0.4.29/src/indexify/executor/monitoring/desired_state_handler.py +24 -0
- indexify-0.4.29/src/indexify/executor/monitoring/reported_state_handler.py +22 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/server.py +4 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/state_reconciler.py +3 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/state_reporter.py +9 -4
- {indexify-0.4.28 → indexify-0.4.29}/README.md +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/cli/__init__.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/cli/build_image.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/cli/deploy.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/cli/executor.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/README.md +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/blob_store/blob_store.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/blob_store/local_fs_blob_store.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/blob_store/metrics/blob_store.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/blob_store/s3_blob_store.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/channel_manager.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_allowlist.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/function_executor.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/health_checker.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/invocation_state_client.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/metrics/function_executor.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/metrics/health_checker.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/metrics/invocation_state_client.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/server/client_configuration.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/server/function_executor_server.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/server/function_executor_server_factory.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/server/subprocess_function_executor_server.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/server/subprocess_function_executor_server_factory.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/__init__.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/aio_utils.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/completed_task_metrics.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/create_function_executor.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/debug_event_loop.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/downloads.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/events.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/finalize_task.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/function_executor_controller.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/loggers.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/message_validators.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/metrics/completed_task_metrics.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/metrics/downloads.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/metrics/finalize_task.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/metrics/function_executor_controller.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/metrics/prepare_task.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/metrics/run_task.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/prepare_task.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/run_task.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/task_info.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/task_input.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/task_output.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/terminate_function_executor.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/host_resources/host_resources.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/host_resources/nvidia_gpu.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/host_resources/nvidia_gpu_allocator.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/logging.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/metrics/channel_manager.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/metrics/executor.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/metrics/state_reconciler.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/metrics/state_reporter.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/handler.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/health_check_handler.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/health_checker/generic_health_checker.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/health_checker/health_checker.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/health_checker/metrics/health_checker.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/metrics.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/prometheus_metrics_handler.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/startup_probe_handler.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/proto/executor_api.proto +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/proto/executor_api_pb2.py +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/proto/executor_api_pb2.pyi +0 -0
- {indexify-0.4.28 → indexify-0.4.29}/src/indexify/proto/executor_api_pb2_grpc.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "indexify"
|
3
3
|
# Incremented if any of the components provided in this packages are updated.
|
4
|
-
version = "0.4.
|
4
|
+
version = "0.4.29"
|
5
5
|
description = "Open Source Indexify components and helper tools"
|
6
6
|
authors = ["Tensorlake Inc. <support@tensorlake.ai>"]
|
7
7
|
license = "Apache 2.0"
|
@@ -23,9 +23,11 @@ from .metrics.executor import (
|
|
23
23
|
metric_executor_info,
|
24
24
|
metric_executor_state,
|
25
25
|
)
|
26
|
+
from .monitoring.desired_state_handler import DesiredStateHandler
|
26
27
|
from .monitoring.health_check_handler import HealthCheckHandler
|
27
28
|
from .monitoring.health_checker.health_checker import HealthChecker
|
28
29
|
from .monitoring.prometheus_metrics_handler import PrometheusMetricsHandler
|
30
|
+
from .monitoring.reported_state_handler import ReportedStateHandler
|
29
31
|
from .monitoring.server import MonitoringServer
|
30
32
|
from .monitoring.startup_probe_handler import StartupProbeHandler
|
31
33
|
from .state_reconciler import ExecutorStateReconciler
|
@@ -59,13 +61,6 @@ class Executor:
|
|
59
61
|
protocol = "https"
|
60
62
|
|
61
63
|
self._startup_probe_handler = StartupProbeHandler()
|
62
|
-
self._monitoring_server = MonitoringServer(
|
63
|
-
host=monitoring_server_host,
|
64
|
-
port=monitoring_server_port,
|
65
|
-
startup_probe_handler=self._startup_probe_handler,
|
66
|
-
health_probe_handler=HealthCheckHandler(health_checker),
|
67
|
-
metrics_handler=PrometheusMetricsHandler(),
|
68
|
-
)
|
69
64
|
self._channel_manager = ChannelManager(
|
70
65
|
server_address=grpc_server_addr,
|
71
66
|
config_path=config_path,
|
@@ -96,6 +91,15 @@ class Executor:
|
|
96
91
|
state_reporter=self._state_reporter,
|
97
92
|
logger=self._logger,
|
98
93
|
)
|
94
|
+
self._monitoring_server = MonitoringServer(
|
95
|
+
host=monitoring_server_host,
|
96
|
+
port=monitoring_server_port,
|
97
|
+
startup_probe_handler=self._startup_probe_handler,
|
98
|
+
health_probe_handler=HealthCheckHandler(health_checker),
|
99
|
+
metrics_handler=PrometheusMetricsHandler(),
|
100
|
+
reported_state_handler=ReportedStateHandler(self._state_reporter),
|
101
|
+
desired_state_handler=DesiredStateHandler(self._state_reconciler),
|
102
|
+
)
|
99
103
|
self._run_aio_task: Optional[asyncio.Task] = None
|
100
104
|
self._shutdown_aio_task: Optional[asyncio.Task] = None
|
101
105
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
from aiohttp import web
|
2
|
+
|
3
|
+
from indexify.proto.executor_api_pb2 import (
|
4
|
+
DesiredExecutorState,
|
5
|
+
)
|
6
|
+
|
7
|
+
from ..state_reconciler import ExecutorStateReconciler
|
8
|
+
from .handler import Handler
|
9
|
+
|
10
|
+
|
11
|
+
class DesiredStateHandler(Handler):
|
12
|
+
def __init__(self, state_reconciler: ExecutorStateReconciler):
|
13
|
+
self._state_reconciler = state_reconciler
|
14
|
+
|
15
|
+
async def handle(self, request: web.Request) -> web.Response:
|
16
|
+
desired_state: DesiredExecutorState | None = (
|
17
|
+
self._state_reconciler.get_desired_state()
|
18
|
+
)
|
19
|
+
if desired_state is None:
|
20
|
+
return web.Response(
|
21
|
+
status=200, text="No desired state received from Server yet"
|
22
|
+
)
|
23
|
+
else:
|
24
|
+
return web.Response(text=str(desired_state))
|
@@ -0,0 +1,22 @@
|
|
1
|
+
from aiohttp import web
|
2
|
+
|
3
|
+
from indexify.proto.executor_api_pb2 import (
|
4
|
+
ReportExecutorStateRequest,
|
5
|
+
)
|
6
|
+
|
7
|
+
from ..state_reporter import ExecutorStateReporter
|
8
|
+
from .handler import Handler
|
9
|
+
|
10
|
+
|
11
|
+
class ReportedStateHandler(Handler):
|
12
|
+
def __init__(self, state_reporter: ExecutorStateReporter):
|
13
|
+
self._state_reporter = state_reporter
|
14
|
+
|
15
|
+
async def handle(self, request: web.Request) -> web.Response:
|
16
|
+
request: ReportExecutorStateRequest | None = (
|
17
|
+
self._state_reporter.last_state_report_request()
|
18
|
+
)
|
19
|
+
if request is None:
|
20
|
+
return web.Response(status=200, text="No state reported so far")
|
21
|
+
else:
|
22
|
+
return web.Response(text=str(request))
|
@@ -11,6 +11,8 @@ class MonitoringServer:
|
|
11
11
|
startup_probe_handler: Handler,
|
12
12
|
health_probe_handler: Handler,
|
13
13
|
metrics_handler: Handler,
|
14
|
+
reported_state_handler: Handler,
|
15
|
+
desired_state_handler: Handler,
|
14
16
|
):
|
15
17
|
self._host = host
|
16
18
|
self._port = port
|
@@ -20,6 +22,8 @@ class MonitoringServer:
|
|
20
22
|
web.get("/monitoring/startup", startup_probe_handler.handle),
|
21
23
|
web.get("/monitoring/health", health_probe_handler.handle),
|
22
24
|
web.get("/monitoring/metrics", metrics_handler.handle),
|
25
|
+
web.get("/state/reported", reported_state_handler.handle),
|
26
|
+
web.get("/state/desired", desired_state_handler.handle),
|
23
27
|
]
|
24
28
|
)
|
25
29
|
self._app_runner: web.AppRunner = web.AppRunner(self._app)
|
@@ -88,6 +88,9 @@ class ExecutorStateReconciler:
|
|
88
88
|
)
|
89
89
|
self._last_desired_state: Optional[DesiredExecutorState] = None
|
90
90
|
|
91
|
+
def get_desired_state(self) -> Optional[DesiredExecutorState]:
|
92
|
+
return self._last_desired_state
|
93
|
+
|
91
94
|
def run(self):
|
92
95
|
"""Runs the state reconciler.
|
93
96
|
|
@@ -89,6 +89,10 @@ class ExecutorStateReporter:
|
|
89
89
|
self._pending_task_results: List[TaskResult] = []
|
90
90
|
self._pending_fe_updates: List[FunctionExecutorUpdate] = []
|
91
91
|
self._function_executor_states: Dict[str, FunctionExecutorState] = {}
|
92
|
+
self._last_state_report_request: Optional[ReportExecutorStateRequest] = None
|
93
|
+
|
94
|
+
def last_state_report_request(self) -> Optional[ReportExecutorStateRequest]:
|
95
|
+
return self._last_state_report_request
|
92
96
|
|
93
97
|
def update_executor_status(self, value: ExecutorStatus) -> None:
|
94
98
|
self._executor_status = value
|
@@ -203,7 +207,11 @@ class ExecutorStateReporter:
|
|
203
207
|
try:
|
204
208
|
state: ExecutorState = self._current_executor_state()
|
205
209
|
update: ExecutorUpdate = self._remove_pending_update()
|
210
|
+
request: ReportExecutorStateRequest = ReportExecutorStateRequest(
|
211
|
+
executor_state=state, executor_update=update
|
212
|
+
)
|
206
213
|
_log_reported_executor_update(update, self._logger)
|
214
|
+
self._last_state_report_request = request
|
207
215
|
|
208
216
|
with (
|
209
217
|
metric_state_report_rpc_errors.count_exceptions(),
|
@@ -211,10 +219,7 @@ class ExecutorStateReporter:
|
|
211
219
|
):
|
212
220
|
metric_state_report_rpcs.inc()
|
213
221
|
await stub.report_executor_state(
|
214
|
-
|
215
|
-
executor_state=state, executor_update=update
|
216
|
-
),
|
217
|
-
timeout=_REPORT_RPC_TIMEOUT_SEC,
|
222
|
+
request, timeout=_REPORT_RPC_TIMEOUT_SEC
|
218
223
|
)
|
219
224
|
self._state_reported_event.set()
|
220
225
|
self._health_checker.server_connection_state_changed(
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/function_executor.py
RENAMED
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor/health_checker.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/__init__.py
RENAMED
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/aio_utils.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/downloads.py
RENAMED
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/events.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/loggers.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/run_task.py
RENAMED
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/task_info.py
RENAMED
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/function_executor_controller/task_input.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/host_resources/nvidia_gpu_allocator.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/health_check_handler.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/prometheus_metrics_handler.py
RENAMED
File without changes
|
{indexify-0.4.28 → indexify-0.4.29}/src/indexify/executor/monitoring/startup_probe_handler.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|