indexify 0.2.26__tar.gz → 0.2.27__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 (33) hide show
  1. {indexify-0.2.26 → indexify-0.2.27}/PKG-INFO +1 -1
  2. {indexify-0.2.26 → indexify-0.2.27}/indexify/functions_sdk/graph.py +8 -10
  3. {indexify-0.2.26 → indexify-0.2.27}/pyproject.toml +2 -1
  4. {indexify-0.2.26 → indexify-0.2.27}/LICENSE.txt +0 -0
  5. {indexify-0.2.26 → indexify-0.2.27}/README.md +0 -0
  6. {indexify-0.2.26 → indexify-0.2.27}/indexify/__init__.py +0 -0
  7. {indexify-0.2.26 → indexify-0.2.27}/indexify/cli.py +0 -0
  8. {indexify-0.2.26 → indexify-0.2.27}/indexify/data_loaders/__init__.py +0 -0
  9. {indexify-0.2.26 → indexify-0.2.27}/indexify/data_loaders/local_directory_loader.py +0 -0
  10. {indexify-0.2.26 → indexify-0.2.27}/indexify/data_loaders/url_loader.py +0 -0
  11. {indexify-0.2.26 → indexify-0.2.27}/indexify/error.py +0 -0
  12. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/agent.py +0 -0
  13. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/api_objects.py +0 -0
  14. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/downloader.py +0 -0
  15. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/executor_tasks.py +0 -0
  16. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/function_worker.py +0 -0
  17. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/image_dependency_installer.py +0 -0
  18. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/indexify_executor.py +0 -0
  19. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/runtime_probes.py +0 -0
  20. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/task_reporter.py +0 -0
  21. {indexify-0.2.26 → indexify-0.2.27}/indexify/executor/task_store.py +0 -0
  22. {indexify-0.2.26 → indexify-0.2.27}/indexify/functions_sdk/data_objects.py +0 -0
  23. {indexify-0.2.26 → indexify-0.2.27}/indexify/functions_sdk/graph_definition.py +0 -0
  24. {indexify-0.2.26 → indexify-0.2.27}/indexify/functions_sdk/graph_validation.py +0 -0
  25. {indexify-0.2.26 → indexify-0.2.27}/indexify/functions_sdk/image.py +0 -0
  26. {indexify-0.2.26 → indexify-0.2.27}/indexify/functions_sdk/indexify_functions.py +0 -0
  27. {indexify-0.2.26 → indexify-0.2.27}/indexify/functions_sdk/local_cache.py +0 -0
  28. {indexify-0.2.26 → indexify-0.2.27}/indexify/functions_sdk/object_serializer.py +0 -0
  29. {indexify-0.2.26 → indexify-0.2.27}/indexify/functions_sdk/pipeline.py +0 -0
  30. {indexify-0.2.26 → indexify-0.2.27}/indexify/http_client.py +0 -0
  31. {indexify-0.2.26 → indexify-0.2.27}/indexify/remote_graph.py +0 -0
  32. {indexify-0.2.26 → indexify-0.2.27}/indexify/remote_pipeline.py +0 -0
  33. {indexify-0.2.26 → indexify-0.2.27}/indexify/settings.py +0 -0
@@ -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
@@ -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
  [tool.poetry]
2
2
  name = "indexify"
3
- version = "0.2.26"
3
+ version = "0.2.27"
4
4
  description = "Python Client for Indexify"
5
5
  authors = ["Tensorlake Inc. <support@tensorlake.ai>"]
6
6
  license = "Apache 2.0"
@@ -32,6 +32,7 @@ pytest = "^7.1.1"
32
32
  pytest-cov = "^4.0.0"
33
33
  pytest-runner = "^6.0.0"
34
34
  pytest-watch = "^4.2.0"
35
+ parameterized = "^0.9.0"
35
36
 
36
37
  [build-system]
37
38
  requires = ["poetry>=1.2"]
File without changes
File without changes
File without changes
File without changes