indexify 0.2.47__tar.gz → 0.2.48__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 (59) hide show
  1. {indexify-0.2.47 → indexify-0.2.48}/PKG-INFO +1 -1
  2. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/single_task_runner.py +2 -2
  3. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/task_runner.py +2 -2
  4. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/function_executor_service.py +7 -1
  5. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/image.py +21 -9
  6. {indexify-0.2.47 → indexify-0.2.48}/pyproject.toml +1 -1
  7. {indexify-0.2.47 → indexify-0.2.48}/LICENSE.txt +0 -0
  8. {indexify-0.2.47 → indexify-0.2.48}/README.md +0 -0
  9. {indexify-0.2.47 → indexify-0.2.48}/indexify/__init__.py +0 -0
  10. {indexify-0.2.47 → indexify-0.2.48}/indexify/cli.py +0 -0
  11. {indexify-0.2.47 → indexify-0.2.48}/indexify/common_util.py +0 -0
  12. {indexify-0.2.47 → indexify-0.2.48}/indexify/data_loaders/__init__.py +0 -0
  13. {indexify-0.2.47 → indexify-0.2.48}/indexify/data_loaders/local_directory_loader.py +0 -0
  14. {indexify-0.2.47 → indexify-0.2.48}/indexify/data_loaders/url_loader.py +0 -0
  15. {indexify-0.2.47 → indexify-0.2.48}/indexify/error.py +0 -0
  16. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/api_objects.py +0 -0
  17. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/downloader.py +0 -0
  18. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/executor.py +0 -0
  19. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/function_executor.py +0 -0
  20. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/function_executor_state.py +0 -0
  21. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/invocation_state_client.py +0 -0
  22. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/server/function_executor_server.py +0 -0
  23. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/server/function_executor_server_factory.py +0 -0
  24. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/server/subprocess_function_executor_server.py +0 -0
  25. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/server/subprocess_function_executor_server_factory.py +0 -0
  26. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/task_input.py +0 -0
  27. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/function_executor/task_output.py +0 -0
  28. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/runtime_probes.py +0 -0
  29. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/task_fetcher.py +0 -0
  30. {indexify-0.2.47 → indexify-0.2.48}/indexify/executor/task_reporter.py +0 -0
  31. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/handlers/run_function/function_inputs_loader.py +0 -0
  32. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/handlers/run_function/handler.py +0 -0
  33. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/handlers/run_function/request_validator.py +0 -0
  34. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/handlers/run_function/response_helper.py +0 -0
  35. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/initialize_request_validator.py +0 -0
  36. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/invocation_state/invocation_state_proxy_server.py +0 -0
  37. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/invocation_state/proxied_invocation_state.py +0 -0
  38. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/invocation_state/response_validator.py +0 -0
  39. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/proto/configuration.py +0 -0
  40. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/proto/function_executor.proto +0 -0
  41. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/proto/function_executor_pb2.py +0 -0
  42. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/proto/function_executor_pb2.pyi +0 -0
  43. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/proto/function_executor_pb2_grpc.py +0 -0
  44. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/proto/message_validator.py +0 -0
  45. {indexify-0.2.47 → indexify-0.2.48}/indexify/function_executor/server.py +0 -0
  46. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/data_objects.py +0 -0
  47. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/graph.py +0 -0
  48. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/graph_definition.py +0 -0
  49. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/graph_validation.py +0 -0
  50. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/indexify_functions.py +0 -0
  51. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/invocation_state/invocation_state.py +0 -0
  52. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/invocation_state/local_invocation_state.py +0 -0
  53. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/object_serializer.py +0 -0
  54. {indexify-0.2.47 → indexify-0.2.48}/indexify/functions_sdk/pipeline.py +0 -0
  55. {indexify-0.2.47 → indexify-0.2.48}/indexify/http_client.py +0 -0
  56. {indexify-0.2.47 → indexify-0.2.48}/indexify/logging.py +0 -0
  57. {indexify-0.2.47 → indexify-0.2.48}/indexify/remote_graph.py +0 -0
  58. {indexify-0.2.47 → indexify-0.2.48}/indexify/remote_pipeline.py +0 -0
  59. {indexify-0.2.47 → indexify-0.2.48}/indexify/settings.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: indexify
3
- Version: 0.2.47
3
+ Version: 0.2.48
4
4
  Summary: Python Client for Indexify
5
5
  Home-page: https://github.com/tensorlakeai/indexify
6
6
  License: Apache 2.0
@@ -80,8 +80,8 @@ class SingleTaskRunner:
80
80
  return function_executor
81
81
  except Exception as e:
82
82
  self._logger.error(
83
- "failed to initialize function executor",
84
- exc_info=e,
83
+ f"failed to initialize function executor: {e.details()}",
84
+ # exc_info=e.details(),
85
85
  )
86
86
  await function_executor.destroy()
87
87
  raise
@@ -33,8 +33,8 @@ class TaskRunner:
33
33
  return await self._run(task_input, logger)
34
34
  except Exception as e:
35
35
  logger.error(
36
- "failed running the task",
37
- exc_info=e,
36
+ f"failed running the task: {e.details()}",
37
+ # exc_info=e.debug_error_string(),
38
38
  )
39
39
  return TaskOutput.internal_error(task_input.task)
40
40
 
@@ -56,7 +56,13 @@ class FunctionExecutorService(FunctionExecutorServicer):
56
56
  # share the model's file descriptor between all tasks or download function configuration
57
57
  # only once.
58
58
  graph_serializer = get_serializer(request.graph.content_type)
59
- graph = graph_serializer.deserialize(request.graph.bytes)
59
+
60
+ try:
61
+ graph = graph_serializer.deserialize(request.graph.bytes)
62
+ except Exception as e:
63
+ self._logger.error(f"Caught exception {e}")
64
+ return InitializeResponse(success=False)
65
+
60
66
  self._function = graph_serializer.deserialize(graph[request.function_name])
61
67
 
62
68
  self._logger = self._logger.bind(
@@ -7,7 +7,7 @@ import pathlib
7
7
  import sys
8
8
  import tarfile
9
9
  from io import BytesIO
10
- from typing import List, Optional
10
+ from typing import Dict, List, Optional
11
11
 
12
12
  import docker
13
13
  import docker.api.build
@@ -32,12 +32,13 @@ HASH_BUFF_SIZE = 1024**2
32
32
 
33
33
  class BuildOp(BaseModel):
34
34
  op_type: str
35
+ options: Dict[str, str] = {}
35
36
  args: List[str]
36
37
 
37
38
  def hash(self, hash):
38
39
  match self.op_type:
39
- case "RUN":
40
- hash.update("RUN".encode())
40
+ case "RUN" | "ADD":
41
+ hash.update(self.op_type.encode())
41
42
  for a in self.args:
42
43
  hash.update(a.encode())
43
44
 
@@ -57,8 +58,10 @@ class BuildOp(BaseModel):
57
58
 
58
59
  def render(self):
59
60
  match self.op_type:
60
- case "RUN":
61
- return f"RUN {''.join(self.args)}"
61
+ case "RUN" | "ADD":
62
+ options = [f"--{k}={v}" for k, v in self.options.items()]
63
+ return f"{self.op_type} {' '.join(options)} {' '.join(self.args)}"
64
+
62
65
  case "COPY":
63
66
  return f"COPY {self.args[0]} {self.args[1]}"
64
67
  case _:
@@ -76,6 +79,7 @@ class Build(BaseModel):
76
79
  image_hash: str
77
80
  status: str | None
78
81
  result: str | None
82
+ error_message: str | None = None # Only provided when result is "failed"
79
83
 
80
84
  created_at: datetime.datetime | None
81
85
  started_at: datetime.datetime | None = None
@@ -105,12 +109,20 @@ class Image:
105
109
  self._base_image = base_image
106
110
  return self
107
111
 
108
- def run(self, run_str):
109
- self._build_ops.append(BuildOp(op_type="RUN", args=[run_str]))
112
+ def add(self, source: str, dest: str, **kwargs):
113
+ self._build_ops.append(
114
+ BuildOp(op_type="ADD", args=[source, dest], options=kwargs)
115
+ )
110
116
  return self
111
117
 
112
- def copy(self, source: str, dest: str):
113
- self._build_ops.append(BuildOp(op_type="COPY", args=[source, dest]))
118
+ def run(self, run_str, **kwargs):
119
+ self._build_ops.append(BuildOp(op_type="RUN", args=[run_str], options=kwargs))
120
+ return self
121
+
122
+ def copy(self, source: str, dest: str, **kwargs):
123
+ self._build_ops.append(
124
+ BuildOp(op_type="COPY", args=[source, dest], options=kwargs)
125
+ )
114
126
  return self
115
127
 
116
128
  def to_image_information(self):
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "indexify"
3
- version = "0.2.47"
3
+ version = "0.2.48"
4
4
  description = "Python Client for Indexify"
5
5
  authors = ["Tensorlake Inc. <support@tensorlake.ai>"]
6
6
  license = "Apache 2.0"
File without changes
File without changes
File without changes
File without changes
File without changes