indexify 0.2.18__py3-none-any.whl → 0.2.19__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.
@@ -2,6 +2,7 @@ import asyncio
2
2
  import json
3
3
  import ssl
4
4
  from concurrent.futures.process import BrokenProcessPool
5
+ from importlib.metadata import version
5
6
  from typing import Dict, List, Optional
6
7
 
7
8
  import httpx
@@ -115,9 +116,9 @@ class ExtractorAgent:
115
116
  )
116
117
  console.print(
117
118
  Panel(
118
- f"Reporting outcome of task {task_outcome.task.id}\n"
119
+ f"Reporting outcome of task: {task_outcome.task.id}, function: {task_outcome.task.compute_fn}\n"
119
120
  f"Outcome: {style_outcome}\n"
120
- f"Outputs: {len(task_outcome.outputs or [])} Router Output: {task_outcome.router_output}",
121
+ f"Num Fn Outputs: {len(task_outcome.outputs or [])} Router Output: {task_outcome.router_output}",
121
122
  title="Task Completion",
122
123
  border_style="info",
123
124
  )
@@ -314,8 +315,10 @@ class ExtractorAgent:
314
315
  # rewrite the image name
315
316
  pass
316
317
 
318
+ executor_version = version("indexify")
317
319
  data = ExecutorMetadata(
318
320
  id=self._executor_id,
321
+ executor_version=executor_version,
319
322
  addr="",
320
323
  image_name=runtime_probe.image_name,
321
324
  labels=runtime_probe.labels,
@@ -18,6 +18,7 @@ class Task(BaseModel):
18
18
 
19
19
  class ExecutorMetadata(BaseModel):
20
20
  id: str
21
+ executor_version: str
21
22
  addr: str
22
23
  image_name: str
23
24
  labels: Dict[str, Any]
@@ -28,11 +28,11 @@ class TaskReporter:
28
28
 
29
29
  def report_task_outcome(self, completed_task: CompletedTask):
30
30
  fn_outputs = []
31
- print(
32
- f"[bold]task-reporter[/bold] uploading output of size: {len(completed_task.outputs or [])}"
33
- )
34
31
  for output in completed_task.outputs or []:
35
32
  output_bytes = MsgPackSerializer.serialize(output)
33
+ print(
34
+ f"[bold]task-reporter[/bold] uploading output of size: {len(output_bytes)} bytes"
35
+ )
36
36
  fn_outputs.append(
37
37
  ("node_outputs", (nanoid.generate(), io.BytesIO(output_bytes)))
38
38
  )
@@ -96,9 +96,9 @@ class Graph:
96
96
  return self
97
97
 
98
98
  if issubclass(indexify_fn, IndexifyFunction) and indexify_fn.accumulate:
99
- self.accumulator_zero_values[
100
- indexify_fn.name
101
- ] = indexify_fn.accumulate().model_dump()
99
+ self.accumulator_zero_values[indexify_fn.name] = (
100
+ indexify_fn.accumulate().model_dump()
101
+ )
102
102
 
103
103
  self.nodes[indexify_fn.name] = indexify_fn
104
104
  return self
@@ -206,9 +206,9 @@ class RouterCallResult(BaseModel):
206
206
 
207
207
  class IndexifyFunctionWrapper:
208
208
  def __init__(self, indexify_function: Union[IndexifyFunction, IndexifyRouter]):
209
- self.indexify_function: Union[
210
- IndexifyFunction, IndexifyRouter
211
- ] = indexify_function()
209
+ self.indexify_function: Union[IndexifyFunction, IndexifyRouter] = (
210
+ indexify_function()
211
+ )
212
212
 
213
213
  def get_output_model(self) -> Any:
214
214
  if not isinstance(self.indexify_function, IndexifyFunction):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: indexify
3
- Version: 0.2.18
3
+ Version: 0.2.19
4
4
  Summary: Python Client for Indexify
5
5
  Home-page: https://github.com/tensorlakeai/indexify
6
6
  License: Apache 2.0
@@ -4,21 +4,21 @@ indexify/data_loaders/__init__.py,sha256=Y5NEuseTcYAICRiweYw5wBQ2m2YplbsY21I7df-
4
4
  indexify/data_loaders/local_directory_loader.py,sha256=fCrgj5drnW71ZUdDDvcB1-VJjIs1w6Q8sEW0HSGSAiA,1247
5
5
  indexify/data_loaders/url_loader.py,sha256=32SERljcq1Xsi4RdLz2dgyk2TER5pQPTtXl3gUzwHbY,1533
6
6
  indexify/error.py,sha256=vjd5SPPNFIEW35GorSIodsqvm9RKHQm9kdp8t9gv-WM,111
7
- indexify/executor/agent.py,sha256=IvHexGFtapPfAB3Ays2KBY1Z0BVknTAj3lbqSzCj7PE,14908
8
- indexify/executor/api_objects.py,sha256=SysjlGYu4JtYdqfexZHHN1IW4TtaDdFUF3hYZ5mpUJU,810
7
+ indexify/executor/agent.py,sha256=IeKaJw1qgoRXjhLZINp-J3Boq0AeR61cPst9sx6KiTY,15099
8
+ indexify/executor/api_objects.py,sha256=QMlHbcL-ZOAMVD71XOJqD_ZIy-NjrUf1DAvi0hFYVg0,836
9
9
  indexify/executor/downloader.py,sha256=3mEDdluTzspsLGAZtFHZOVuyKOzT3CSema2kIK6Z1yU,4005
10
10
  indexify/executor/executor_tasks.py,sha256=gAZ2pvza1YwGlaR1o_tJW4SXtdCgK7sLJgp4W7rOjR0,1834
11
11
  indexify/executor/function_worker.py,sha256=pCGn13rg4dEykzmwYNyCTkewrpyQXQR1cH6n2Hx5Lfc,5813
12
12
  indexify/executor/indexify_executor.py,sha256=2Ut_VX-Su_lm4b4aEROyRJ3gXx-uFHA-V7EN0sWiARE,771
13
13
  indexify/executor/runtime_probes.py,sha256=JY0FoxtlQ9sgsE8gBKWM5h3R1TWkYENhNF0HR2KkV4Q,1704
14
- indexify/executor/task_reporter.py,sha256=gnnse0v6rjjni8lNzeb-ZYq6iF2DgafKoT7dcGUZhQ4,3716
14
+ indexify/executor/task_reporter.py,sha256=kbWoqY5IbAUdCzXDkzfuXEUznQN968ABPCYt-zCGJY4,3718
15
15
  indexify/executor/task_store.py,sha256=q8s2gImsFffWeXQR0mk1Xlo1Aj_2GfclNPjQ2EA_YBo,3984
16
16
  indexify/functions_sdk/data_objects.py,sha256=CQZMzYiV7l6dyzFkYquWQHqdte6JnC7XA3i2ZyvPvgQ,844
17
- indexify/functions_sdk/graph.py,sha256=AaNU0D3YHFZorEkXKLiaftE8MncO6oChG5AKXD0rd1o,11141
17
+ indexify/functions_sdk/graph.py,sha256=L8jtuSGaUk05JgT_cQX-n_1H9t84lcPa1v4XXlpuJa0,11143
18
18
  indexify/functions_sdk/graph_definition.py,sha256=fwv63wkuKeVQxJQk9ofu8ZL3B0NzJzF9bJhFdVZZvMQ,1317
19
19
  indexify/functions_sdk/graph_validation.py,sha256=XLHiC9PAtZungJLysU3hIUOPNDkO5TXUDZ_jiZ0H4hg,2508
20
20
  indexify/functions_sdk/image.py,sha256=QK0H6KxLWriB_z4M0kunKzzHdHxYLWL670RPYgYuf_8,1762
21
- indexify/functions_sdk/indexify_functions.py,sha256=XRsa4IR9rQXdvF2X7Tbudj0rTCMOV8HJqezgaPgH9sU,11107
21
+ indexify/functions_sdk/indexify_functions.py,sha256=KLeRQY5IcrVp5T3K4yQ8Uu_CLL-Cj7uOG0L7y6uJnfU,11109
22
22
  indexify/functions_sdk/local_cache.py,sha256=cNWF67zbhbTJe3g86hyLBy3Rqzs6dNvp2SjLazGZWvw,1348
23
23
  indexify/functions_sdk/object_serializer.py,sha256=Zz4GobW3ZamBBtFDF76QxU3TP6oJNdWnhsfKd0OUFoc,1660
24
24
  indexify/functions_sdk/pipeline.py,sha256=7hDatRK-SCHYvttf2Vj5YFyiJEVU0OOXEZBOIQenSmk,847
@@ -26,8 +26,8 @@ indexify/http_client.py,sha256=MflqHbkkzYWw64nnmZCeJE76Q9p-o5hFnlI3h7kbJFI,13729
26
26
  indexify/remote_graph.py,sha256=ILg6IY6EFgyvnfz1DSzicBZhqvPkg2-UUwgI6lxp6sA,3094
27
27
  indexify/remote_pipeline.py,sha256=FW7IAv3r24OOpiqlprw3kuFrpdkqi6Ic4_tT26FThjA,761
28
28
  indexify/settings.py,sha256=LSaWZ0ADIVmUv6o6dHWRC3-Ry5uLbCw2sBSg1e_U7UM,99
29
- indexify-0.2.18.dist-info/LICENSE.txt,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
30
- indexify-0.2.18.dist-info/METADATA,sha256=NqazD7Kypzfm19nWd4N8bzAVymbNLKUV3jz1YO9LBMw,6199
31
- indexify-0.2.18.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
32
- indexify-0.2.18.dist-info/entry_points.txt,sha256=Pih7WV-XMpAzI5dEvROcpLr-ybVhd9Y-AtuzBKUdcDs,49
33
- indexify-0.2.18.dist-info/RECORD,,
29
+ indexify-0.2.19.dist-info/LICENSE.txt,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
30
+ indexify-0.2.19.dist-info/METADATA,sha256=TdRtdNYEXcffmOtFnSvN3FDH631dPxUd-ZLJrZWvNOo,6199
31
+ indexify-0.2.19.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
32
+ indexify-0.2.19.dist-info/entry_points.txt,sha256=Pih7WV-XMpAzI5dEvROcpLr-ybVhd9Y-AtuzBKUdcDs,49
33
+ indexify-0.2.19.dist-info/RECORD,,