From e6e0660b52e5e719f108478f0eba59f012a052ab Mon Sep 17 00:00:00 2001 From: hajdul88 <52442977+hajdul88@users.noreply.github.com> Date: Thu, 20 Mar 2025 10:51:32 +0100 Subject: [PATCH] chore: updates git version of cognee_modal with test script --- cognee_parallel_deployment/cognee_modal.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cognee_parallel_deployment/cognee_modal.py b/cognee_parallel_deployment/cognee_modal.py index e9c0adb1d..13f205751 100644 --- a/cognee_parallel_deployment/cognee_modal.py +++ b/cognee_parallel_deployment/cognee_modal.py @@ -24,16 +24,18 @@ image = ( .add_local_file("poetry.lock", remote_path="/root/poetry.lock", copy=True) .env(local_env_vars) .poetry_install_from_file(poetry_pyproject_toml="pyproject.toml") - .pip_install("protobuf", "h2") + .pip_install("protobuf", "h2", "neo4j") .add_local_python_source("cognee") ) -@app.function(image=image, max_containers=5) +@app.function(image=image, max_containers=10, retries=3) async def entry(name: str, text: str): setup_logging(logging.INFO) logger.info(f"file_name: {name}") + setup_logging(logging.ERROR) await cognee.add(text) + await cognee.cognify() def batch_files(file_list, batch_size): @@ -44,7 +46,7 @@ def batch_files(file_list, batch_size): @app.local_entrypoint() async def main(): directory_name = "cognee_parallel_deployment/modal_input/" - batch_size = 10 + batch_size = 20 files = [ os.path.join(directory_name, f)