indexify 0.2.26__py3-none-any.whl → 0.2.27__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.
@@ -81,7 +81,7 @@ class Graph:
81
81
  # Storage for local execution
82
82
  self._results: Dict[str, Dict[str, List[IndexifyData]]] = {}
83
83
  self._cache = CacheAwareFunctionWrapper("./indexify_local_runner_cache")
84
- self._accumulator_values: Dict[str, Dict[str, IndexifyData]] = {}
84
+ self._accumulator_values: Dict[str, IndexifyData] = {}
85
85
  self._local_graph_ctx: Optional[GraphInvocationContext] = None
86
86
 
87
87
  def get_function(self, name: str) -> IndexifyFunctionWrapper:
@@ -158,7 +158,7 @@ class Graph:
158
158
  def definition(self) -> ComputeGraphMetadata:
159
159
  start_node = self.nodes[self._start_node]
160
160
  is_reducer = False
161
- if hasattr(start_node, 'accumulate'):
161
+ if hasattr(start_node, "accumulate"):
162
162
  is_reducer = start_node.accumulate is not None
163
163
  start_node = FunctionMetadata(
164
164
  name=start_node.name,
@@ -219,13 +219,12 @@ class Graph:
219
219
  )
220
220
  print(f"[bold] Invoking {self._start_node}[/bold]")
221
221
  outputs = defaultdict(list)
222
- self._accumulator_values[input.id] = {}
223
222
  for k, v in self.accumulator_zero_values.items():
224
223
  node = self.nodes[k]
225
224
  serializer = get_serializer(node.encoder)
226
- self._accumulator_values[input.id] = {
227
- k: IndexifyData(payload=serializer.serialize(v), encoder=node.encoder)
228
- }
225
+ self._accumulator_values[k] = IndexifyData(
226
+ payload=serializer.serialize(v), encoder=node.encoder
227
+ )
229
228
  self._results[input.id] = outputs
230
229
  ctx = GraphInvocationContext(
231
230
  invocation_id=input.id,
@@ -242,7 +241,6 @@ class Graph:
242
241
  initial_input: IndexifyData,
243
242
  outputs: Dict[str, List[bytes]],
244
243
  ):
245
- accumulator_values = self._accumulator_values[initial_input.id]
246
244
  queue = deque([(self._start_node, initial_input)])
247
245
  while queue:
248
246
  node_name, input = queue.popleft()
@@ -258,12 +256,12 @@ class Graph:
258
256
  out_edges = self.edges.get(node_name, [])
259
257
  fn_outputs = function_outputs.ser_outputs
260
258
  print(f"ran {node_name}: num outputs: {len(fn_outputs)}")
261
- if accumulator_values.get(node_name, None) is not None:
262
- accumulator_values[node_name] = fn_outputs[-1].model_copy()
259
+ if self._accumulator_values.get(node_name, None) is not None:
260
+ self._accumulator_values[node_name] = fn_outputs[-1].model_copy()
263
261
  outputs[node_name] = []
264
262
  if fn_outputs:
265
263
  outputs[node_name].extend(fn_outputs)
266
- if accumulator_values.get(node_name, None) is not None and queue:
264
+ if self._accumulator_values.get(node_name, None) is not None and queue:
267
265
  print(
268
266
  f"accumulator not none for {node_name}, continuing, len queue: {len(queue)}"
269
267
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: indexify
3
- Version: 0.2.26
3
+ Version: 0.2.27
4
4
  Summary: Python Client for Indexify
5
5
  Home-page: https://github.com/tensorlakeai/indexify
6
6
  License: Apache 2.0
@@ -15,7 +15,7 @@ indexify/executor/runtime_probes.py,sha256=mjw2_mGQ622wRT_39WPGGgPEZQTgtrf3-ICcU
15
15
  indexify/executor/task_reporter.py,sha256=7M2fDzLDkSNOSr42EBtkIbGvBzeZlTCqxQuDfdoFT4Y,3349
16
16
  indexify/executor/task_store.py,sha256=u48FdRKAh_KH7WOMQOArdOY5CawlyW5MJx8V0W79JM0,3951
17
17
  indexify/functions_sdk/data_objects.py,sha256=G08Nrfe2nMUXEhMSedIZwNcZLEsEnj0NykmLPaMZmFs,842
18
- indexify/functions_sdk/graph.py,sha256=bfVJRAnStBSIxS-6jvOua1lk45RFJjahyzui2OBFcwo,11942
18
+ indexify/functions_sdk/graph.py,sha256=a28o07g0MJoBq2rQWfMGK_dtiSyryoADeF7tEuhI8gc,11817
19
19
  indexify/functions_sdk/graph_definition.py,sha256=s8NbqZRaVw1mhGvaaUZ2cJ0NitdlbLj1tnkKjsc71U4,1309
20
20
  indexify/functions_sdk/graph_validation.py,sha256=mN2Fcp91GIwFZEQP6z_qGqt4LkLM70SnI7AWBi4CmKQ,2509
21
21
  indexify/functions_sdk/image.py,sha256=QK0H6KxLWriB_z4M0kunKzzHdHxYLWL670RPYgYuf_8,1762
@@ -27,8 +27,8 @@ indexify/http_client.py,sha256=mGSSZSMJOShoZGDq42f0kiCQ_aIg2ZjWKeaOW35_r8g,15400
27
27
  indexify/remote_graph.py,sha256=_04bdraDaeEmkvEcsxIZ8M37BCAjfbfQccZpAgnZJ2c,4435
28
28
  indexify/remote_pipeline.py,sha256=FW7IAv3r24OOpiqlprw3kuFrpdkqi6Ic4_tT26FThjA,761
29
29
  indexify/settings.py,sha256=Ny59mzYI4gbXoK8hjx66a_men6ndbd1J1zCTcKOoyzg,50
30
- indexify-0.2.26.dist-info/LICENSE.txt,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
31
- indexify-0.2.26.dist-info/METADATA,sha256=9zbV89Ar2HZqBnC8QCpuiU8Pk1tE8vx1BU3zPf9jGU8,6242
32
- indexify-0.2.26.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
33
- indexify-0.2.26.dist-info/entry_points.txt,sha256=Pih7WV-XMpAzI5dEvROcpLr-ybVhd9Y-AtuzBKUdcDs,49
34
- indexify-0.2.26.dist-info/RECORD,,
30
+ indexify-0.2.27.dist-info/LICENSE.txt,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
31
+ indexify-0.2.27.dist-info/METADATA,sha256=Ok21hFzjW-T6uEn4fNrZC1ioUeDvmbQdUvlZcYNg7KU,6242
32
+ indexify-0.2.27.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
33
+ indexify-0.2.27.dist-info/entry_points.txt,sha256=Pih7WV-XMpAzI5dEvROcpLr-ybVhd9Y-AtuzBKUdcDs,49
34
+ indexify-0.2.27.dist-info/RECORD,,