indexify 0.2.15__tar.gz → 0.2.16__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.2.15 → indexify-0.2.16}/PKG-INFO +1 -1
- {indexify-0.2.15 → indexify-0.2.16}/indexify/functions_sdk/image.py +14 -5
- {indexify-0.2.15 → indexify-0.2.16}/indexify/functions_sdk/indexify_functions.py +3 -1
- {indexify-0.2.15 → indexify-0.2.16}/pyproject.toml +1 -1
- {indexify-0.2.15 → indexify-0.2.16}/LICENSE.txt +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/README.md +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/__init__.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/cli.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/data_loaders/__init__.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/data_loaders/local_directory_loader.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/data_loaders/url_loader.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/error.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/executor/agent.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/executor/api_objects.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/executor/downloader.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/executor/executor_tasks.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/executor/function_worker.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/executor/indexify_executor.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/executor/runtime_probes.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/executor/task_reporter.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/executor/task_store.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/functions_sdk/data_objects.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/functions_sdk/graph.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/functions_sdk/graph_definition.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/functions_sdk/graph_validation.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/functions_sdk/local_cache.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/functions_sdk/object_serializer.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/functions_sdk/pipeline.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/http_client.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/remote_graph.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/remote_pipeline.py +0 -0
- {indexify-0.2.15 → indexify-0.2.16}/indexify/settings.py +0 -0
@@ -1,11 +1,20 @@
|
|
1
|
+
def python_version_to_image(python_version):
|
2
|
+
if python_version.startswith("3.9"):
|
3
|
+
return "python:3.9.20-bookworm"
|
4
|
+
elif python_version.startswith("3.10"):
|
5
|
+
return "python:3.10.15-bookworm"
|
6
|
+
elif python_version.startswith("3.11"):
|
7
|
+
return "python:3.11.10-bookworm"
|
8
|
+
else:
|
9
|
+
raise ValueError(f"unsupported Python version: {python_version}")
|
10
|
+
|
11
|
+
|
1
12
|
class Image:
|
2
|
-
def __init__(self):
|
13
|
+
def __init__(self, python="3.10"):
|
3
14
|
self._image_name = None
|
4
|
-
|
5
15
|
self._tag = "latest"
|
6
|
-
|
7
|
-
self.
|
8
|
-
|
16
|
+
self._base_image = python_version_to_image(python)
|
17
|
+
self._python_version = python
|
9
18
|
self._run_strs = []
|
10
19
|
|
11
20
|
def name(self, image_name):
|
@@ -218,6 +218,8 @@ class IndexifyFunctionWrapper:
|
|
218
218
|
args.append(input)
|
219
219
|
|
220
220
|
extracted_data = self.indexify_function.run(*args, **kwargs)
|
221
|
+
if extracted_data is None:
|
222
|
+
return []
|
221
223
|
|
222
224
|
return extracted_data if isinstance(extracted_data, list) else [extracted_data]
|
223
225
|
|
@@ -234,7 +236,7 @@ class IndexifyFunctionWrapper:
|
|
234
236
|
acc = self.indexify_function.accumulate.model_validate(
|
235
237
|
self.indexify_function.accumulate()
|
236
238
|
)
|
237
|
-
outputs: List[Any] = self.run_fn(input, acc=acc)
|
239
|
+
outputs: Optional[List[Any]] = self.run_fn(input, acc=acc)
|
238
240
|
return [
|
239
241
|
IndexifyData(payload=serializer.serialize(output)) for output in outputs
|
240
242
|
]
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|