cocoindex 0.2.23__tar.gz → 0.3.0__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.
- {cocoindex-0.2.23 → cocoindex-0.3.0}/Cargo.lock +3 -1
- {cocoindex-0.2.23 → cocoindex-0.3.0}/Cargo.toml +2 -1
- {cocoindex-0.2.23 → cocoindex-0.3.0}/PKG-INFO +1 -1
- {cocoindex-0.2.23 → cocoindex-0.3.0}/THIRD_PARTY_NOTICES.html +1 -1
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/functions/sbert.py +6 -3
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/op.py +52 -17
- cocoindex-0.3.0/python/cocoindex/runtime.py +74 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/subprocess_exec.py +1 -27
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/live_updater.rs +34 -22
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/source_indexer.rs +55 -51
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/lib_context.rs +2 -2
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/factory_bases.rs +80 -2
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/py_factory.rs +92 -28
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/prelude.rs +1 -1
- cocoindex-0.3.0/src/py/future.rs +85 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/py/mod.rs +9 -2
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/service/error.rs +10 -4
- cocoindex-0.3.0/src/utils/batching.rs +322 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/mod.rs +1 -0
- cocoindex-0.2.23/python/cocoindex/runtime.py +0 -44
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.cargo/config.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.env.lib_debug +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/ISSUE_TEMPLATE//360/237/220/233-bug-report.md" +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/ISSUE_TEMPLATE//360/237/222/241-feature-request.md" +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/SECURITY.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/scripts/update_version.sh +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/CI.yml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/_docs_release.yml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/_test.yml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/docs_release.yml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/docs_test.yml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/format.yml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.github/workflows/release.yml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/.pre-commit-config.yaml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/CODE_OF_CONDUCT.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/CONTRIBUTING.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/LICENSE +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/about.hbs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/about.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/dev/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/dev/generate_cli_docs.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/dev/neo4j.yaml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/dev/postgres.yaml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/about/community.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/ai/llm.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/contributing/guide.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/contributing/new_built_in_target.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/contributing/setup_dev_environment.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/basics.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/cli-commands.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/cli.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/data_example.svg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/data_types.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/flow_def.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/flow_example.svg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/flow_methods.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/core/settings.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/custom_ops/custom_functions.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/custom_ops/custom_sources.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/custom_ops/custom_targets.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/00_codebase_index.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/01_docs_to_knowledge_graph.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/02_academic_papers_index.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/03_postgres_source.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/custom_targets.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/document_ai.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/image_search.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/manual_extraction.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/multi_format_index.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/patient_form_extraction.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/photo_search.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/product_recommendation.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/examples/simple_vector_index.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/examples/index.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/getting_started/installation.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/getting_started/markdown_files.zip +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/getting_started/overview.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/getting_started/quickstart.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/ops/functions.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/query.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/amazons3.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/azureblob.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/googledrive.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/index.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/localfile.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/sources/postgres.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/index.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/kuzu.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/lancedb.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/neo4j.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/postgres.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/targets/qdrant.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/tutorials/live_updates.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docs/tutorials/manage_flow_dynamically.mdx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/docusaurus.config.ts +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/package.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/sidebars.ts +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/components/GitHubButton/index.tsx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/css/custom.css +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/DocCard/index.tsx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/DocCard/styles.module.css +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/DocCardList/index.tsx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/DocCardList/styles.module.css +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/src/theme/Root.js +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/.nojekyll +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/docusaurus.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/abstract_chunks.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/basic_info.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/chunk_embedding.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/first_page.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/academic_papers_index/metadata.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/codebase_index/chunk.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/codebase_index/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/codebase_index/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/custom_targets/convert.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/custom_targets/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/dedupe.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/export_document.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/export_relationship.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/extract_relationship.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/neo4j_browser.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/relationship.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/docs_to_knowledge_graph/summary.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/document_ai/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/document_ai/document_ai.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/document_ai/processor.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/embedding.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/multi_modal_architecture.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/image_search/result.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/manual_extraction/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/manual_extraction/extraction.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/manual_extraction/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/manual_extraction/summary.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/colpali_architecture.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/embed.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/multi_format_index/pages.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/extraction.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/fields.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/patient_form_extraction/tomarkdown.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/photo_search/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/photo_search/extraction.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/photo_search/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/collector.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/description.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/embed.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/lineage.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/price.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/postgres_source/source.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/dedupe.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/export_all.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/export_product.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/export_taxonomy.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/extract_product.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/extract_taxonomy.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/neo4j.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/parse_json.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/product_recommendation/taxonomy.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/simple_vector_index/chunk.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/simple_vector_index/cover.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/simple_vector_index/embed.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/examples/simple_vector_index/flow.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/favicon.ico +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/icon.svg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/img/incremental-etl.gif +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/static/robots.txt +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/tsconfig.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/docs/yarn.lock +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/.env.example +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/amazon_s3_embedding/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/.env.example +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/azure_blob_embedding/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/code_embedding/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/code_embedding/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/code_embedding/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/code_embedding/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/data/bizarre_animals.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/data/chunk_norris.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_output_files/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/.env.example +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/custom_source_hn/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/docs_to_knowledge_graph/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/docs_to_knowledge_graph/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/docs_to_knowledge_graph/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/docs_to_knowledge_graph/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/images/Carter_welcomes_Reagan.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/images/Solvay_conference_1927.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/images/Steve_Jobs_and_Bill_Gates_(522695099).jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/images/einplanck3.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/face_recognition/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/.dockerignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/compose.yaml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/dockerfile +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/files/1810.04805v2.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/fastapi_server_docker/requirements.txt +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/.env.example +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/gdrive_text_embedding/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/.env.example +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/hn_trending_topics/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/colpali_main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/index.html +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/package-lock.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/package.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/src/App.jsx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/src/main.jsx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/src/style.css +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/frontend/vite.config.js +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/img/cat1.jpeg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/img/dog1.jpeg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/img/elephant1.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/img/giraffe.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/image_search/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/data/bizarre_animals.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/data/chunk_norris.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/live_updates/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/manuals/array.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/manuals/base64.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/manuals/copy.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/manuals/glob.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/manuals_llm_extraction/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/1706.03762v7.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/1810.04805v2.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/2502.06786v3.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/healthcare_industry_test_p101.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/healthcare_industry_test_p86.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/healthcare_industry_test_p9.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/restaurant_brands_international_2023.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/multi_format_indexing/source_files/sweetgreen_2023.jpg +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/.env.example +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/papers/1706.03762v7.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/papers/1810.04805v2.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/papers/2502.06786v3.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/papers/2502.20346v1.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/paper_metadata/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/.env.example +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_David_Artificial.docx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Emily_Artificial.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_Form_Joe_Artificial.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/data/patient_forms/Patient_Intake_From_Jane_Artificial.docx +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/patient_intake_extraction/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/fetch_manual_urls.sh +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_elements_embedding/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/pdf_files/1706.03762v7.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/pdf_files/1810.04805v2.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/pdf_files/rfc8259.pdf +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/pdf_embedding/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/prepare_source_data.sql +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/postgres_source/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/.env.example +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/img/cocoinsight.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/img/neo4j.png +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p1.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p2.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p3.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p4.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p5.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p6.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p7.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p8.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/products/p9.json +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/product_recommendation/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/Text_Embedding.ipynb +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/markdown_files/1706.03762v7.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/markdown_files/1810.04805v2.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/.gitignore +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_lancedb/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/.env +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/README.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/main.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/markdown_files/rfc8259.md +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/examples/text_embedding_qdrant/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/pyproject.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/__init__.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/auth_registry.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/cli.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/engine_object.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/engine_value.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/flow.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/functions/__init__.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/functions/_engine_builtin_specs.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/functions/colpali.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/index.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/lib.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/llm.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/py.typed +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/query_handler.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/setting.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/setup.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/sources/__init__.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/sources/_engine_builtin_specs.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/targets/__init__.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/targets/_engine_builtin_specs.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/targets/lancedb.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/__init__.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_engine_object.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_engine_value.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_optional_database.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_transform_flow.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_typing.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/tests/test_validation.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/typing.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/user_app_loader.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/utils.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/python/cocoindex/validation.py +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/ruff.toml +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/duration.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/field_attrs.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/json_schema.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/schema.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/spec.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/base/value.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/analyzed_flow.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/analyzer.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/exec_ctx.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/flow_builder.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/builder/plan.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/db_tracking.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/db_tracking_setup.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/dumper.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/evaluator.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/indexing_status.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/memoization.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/row_indexer.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/execution/stats.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/lib.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/anthropic.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/bedrock.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/gemini.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/litellm.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/ollama.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/openai.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/openrouter.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/vllm.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/llm/voyage.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/detect_program_lang.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/embed_text.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/extract_by_llm.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/parse_json.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/split_by_separators.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/split_recursively.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/functions/test_utils.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/interface.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/registration.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/registry.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sdk.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/shared/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/shared/postgres.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/shared/program_langs.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/shared/split.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/amazon_s3.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/azure_blob.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/google_drive.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/local_file.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/postgres.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/shared/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/sources/shared/pattern_matcher.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/kuzu.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/neo4j.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/postgres.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/qdrant.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/shared/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/shared/property_graph.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/ops/targets/shared/table_columns.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/py/convert.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/server.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/service/flows.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/service/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/service/query_handler.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/settings.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/auth_registry.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/components.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/db_metadata.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/driver.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/flow_features.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/mod.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/setup/states.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/bytes_decode.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/concur_control.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/db.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/deser.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/fingerprint.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/immutable.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/retryable.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/str_sanitize.rs +0 -0
- {cocoindex-0.2.23 → cocoindex-0.3.0}/src/utils/yaml_ser.rs +0 -0
|
@@ -1298,7 +1298,7 @@ dependencies = [
|
|
|
1298
1298
|
|
|
1299
1299
|
[[package]]
|
|
1300
1300
|
name = "cocoindex"
|
|
1301
|
-
version = "0.
|
|
1301
|
+
version = "0.3.0"
|
|
1302
1302
|
dependencies = [
|
|
1303
1303
|
"anyhow",
|
|
1304
1304
|
"async-openai",
|
|
@@ -1363,6 +1363,7 @@ dependencies = [
|
|
|
1363
1363
|
"time",
|
|
1364
1364
|
"tokio",
|
|
1365
1365
|
"tokio-stream",
|
|
1366
|
+
"tokio-util",
|
|
1366
1367
|
"tower 0.5.2",
|
|
1367
1368
|
"tower-http",
|
|
1368
1369
|
"tree-sitter",
|
|
@@ -5667,6 +5668,7 @@ dependencies = [
|
|
|
5667
5668
|
"bytes",
|
|
5668
5669
|
"futures-core",
|
|
5669
5670
|
"futures-sink",
|
|
5671
|
+
"futures-util",
|
|
5670
5672
|
"pin-project-lite",
|
|
5671
5673
|
"tokio",
|
|
5672
5674
|
]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name = "cocoindex"
|
|
3
3
|
# Version used for local development is always higher than others to take precedence.
|
|
4
4
|
# Will be overridden for specific release versions.
|
|
5
|
-
version = "0.
|
|
5
|
+
version = "0.3.0"
|
|
6
6
|
edition = "2024"
|
|
7
7
|
rust-version = "1.89"
|
|
8
8
|
license = "Apache-2.0"
|
|
@@ -157,3 +157,4 @@ serde_path_to_error = "0.1.17"
|
|
|
157
157
|
redis = { version = "0.31.0", features = ["tokio-comp", "connection-manager"] }
|
|
158
158
|
expect-test = "1.5.0"
|
|
159
159
|
encoding_rs = "0.8.35"
|
|
160
|
+
tokio-util = { version = "0.7.16", features = ["rt"] }
|
|
@@ -2846,7 +2846,7 @@ Software.
|
|
|
2846
2846
|
<h3 id="Apache-2.0">Apache License 2.0</h3>
|
|
2847
2847
|
<h4>Used by:</h4>
|
|
2848
2848
|
<ul class="license-used-by">
|
|
2849
|
-
<li><a href=" https://crates.io/crates/cocoindex ">cocoindex 0.
|
|
2849
|
+
<li><a href=" https://crates.io/crates/cocoindex ">cocoindex 0.3.0</a></li>
|
|
2850
2850
|
<li><a href=" https://github.com/awesomized/crc-fast-rust ">crc-fast 1.3.0</a></li>
|
|
2851
2851
|
<li><a href=" https://github.com/qdrant/rust-client ">qdrant-client 1.15.0</a></li>
|
|
2852
2852
|
</ul>
|
|
@@ -31,6 +31,7 @@ class SentenceTransformerEmbed(op.FunctionSpec):
|
|
|
31
31
|
@op.executor_class(
|
|
32
32
|
gpu=True,
|
|
33
33
|
cache=True,
|
|
34
|
+
batching=True,
|
|
34
35
|
behavior_version=1,
|
|
35
36
|
arg_relationship=(op.ArgRelationship.EMBEDDING_ORIGIN_TEXT, "text"),
|
|
36
37
|
)
|
|
@@ -57,7 +58,9 @@ class SentenceTransformerEmbedExecutor:
|
|
|
57
58
|
dim = self._model.get_sentence_embedding_dimension()
|
|
58
59
|
return Vector[np.float32, Literal[dim]] # type: ignore
|
|
59
60
|
|
|
60
|
-
def __call__(self, text: str) -> NDArray[np.float32]:
|
|
61
|
+
def __call__(self, text: list[str]) -> list[NDArray[np.float32]]:
|
|
61
62
|
assert self._model is not None
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
results: list[NDArray[np.float32]] = self._model.encode(
|
|
64
|
+
text, convert_to_numpy=True
|
|
65
|
+
)
|
|
66
|
+
return results
|
|
@@ -32,6 +32,7 @@ from .engine_value import (
|
|
|
32
32
|
)
|
|
33
33
|
from .typing import (
|
|
34
34
|
KEY_FIELD_NAME,
|
|
35
|
+
AnalyzedListType,
|
|
35
36
|
AnalyzedTypeInfo,
|
|
36
37
|
StructSchema,
|
|
37
38
|
StructType,
|
|
@@ -45,6 +46,7 @@ from .typing import (
|
|
|
45
46
|
EnrichedValueType,
|
|
46
47
|
decode_engine_field_schemas,
|
|
47
48
|
FieldSchema,
|
|
49
|
+
ValueType,
|
|
48
50
|
)
|
|
49
51
|
from .runtime import to_async_call
|
|
50
52
|
from .index import IndexOptions
|
|
@@ -149,6 +151,7 @@ class OpArgs:
|
|
|
149
151
|
"""
|
|
150
152
|
- gpu: Whether the executor will be executed on GPU.
|
|
151
153
|
- cache: Whether the executor will be cached.
|
|
154
|
+
- batching: Whether the executor will be batched.
|
|
152
155
|
- behavior_version: The behavior version of the executor. Cache will be invalidated if it
|
|
153
156
|
changes. Must be provided if `cache` is True.
|
|
154
157
|
- arg_relationship: It specifies the relationship between an input argument and the output,
|
|
@@ -158,6 +161,7 @@ class OpArgs:
|
|
|
158
161
|
|
|
159
162
|
gpu: bool = False
|
|
160
163
|
cache: bool = False
|
|
164
|
+
batching: bool = False
|
|
161
165
|
behavior_version: int | None = None
|
|
162
166
|
arg_relationship: tuple[ArgRelationship, str] | None = None
|
|
163
167
|
|
|
@@ -168,6 +172,16 @@ class _ArgInfo:
|
|
|
168
172
|
is_required: bool
|
|
169
173
|
|
|
170
174
|
|
|
175
|
+
def _make_batched_engine_value_decoder(
|
|
176
|
+
field_path: list[str], src_type: ValueType, dst_type_info: AnalyzedTypeInfo
|
|
177
|
+
) -> Callable[[Any], Any]:
|
|
178
|
+
if not isinstance(dst_type_info.variant, AnalyzedListType):
|
|
179
|
+
raise ValueError("Expected arguments for batching function to be a list type")
|
|
180
|
+
elem_type_info = analyze_type_info(dst_type_info.variant.elem_type)
|
|
181
|
+
base_decoder = make_engine_value_decoder(field_path, src_type, elem_type_info)
|
|
182
|
+
return lambda value: [base_decoder(v) for v in value]
|
|
183
|
+
|
|
184
|
+
|
|
171
185
|
def _register_op_factory(
|
|
172
186
|
category: OpCategory,
|
|
173
187
|
expected_args: list[tuple[str, inspect.Parameter]],
|
|
@@ -181,6 +195,10 @@ def _register_op_factory(
|
|
|
181
195
|
Register an op factory.
|
|
182
196
|
"""
|
|
183
197
|
|
|
198
|
+
if op_args.batching:
|
|
199
|
+
if len(expected_args) != 1:
|
|
200
|
+
raise ValueError("Batching is only supported for single argument functions")
|
|
201
|
+
|
|
184
202
|
class _WrappedExecutor:
|
|
185
203
|
_executor: Any
|
|
186
204
|
_args_info: list[_ArgInfo]
|
|
@@ -208,7 +226,7 @@ def _register_op_factory(
|
|
|
208
226
|
"""
|
|
209
227
|
self._args_info = []
|
|
210
228
|
self._kwargs_info = {}
|
|
211
|
-
attributes =
|
|
229
|
+
attributes = {}
|
|
212
230
|
potentially_missing_required_arg = False
|
|
213
231
|
|
|
214
232
|
def process_arg(
|
|
@@ -220,14 +238,17 @@ def _register_op_factory(
|
|
|
220
238
|
if op_args.arg_relationship is not None:
|
|
221
239
|
related_attr, related_arg_name = op_args.arg_relationship
|
|
222
240
|
if related_arg_name == arg_name:
|
|
223
|
-
attributes.
|
|
224
|
-
TypeAttr(related_attr.value, actual_arg.analyzed_value)
|
|
225
|
-
)
|
|
241
|
+
attributes[related_attr.value] = actual_arg.analyzed_value
|
|
226
242
|
type_info = analyze_type_info(arg_param.annotation)
|
|
227
243
|
enriched = EnrichedValueType.decode(actual_arg.value_type)
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
244
|
+
if op_args.batching:
|
|
245
|
+
decoder = _make_batched_engine_value_decoder(
|
|
246
|
+
[arg_name], enriched.type, type_info
|
|
247
|
+
)
|
|
248
|
+
else:
|
|
249
|
+
decoder = make_engine_value_decoder(
|
|
250
|
+
[arg_name], enriched.type, type_info
|
|
251
|
+
)
|
|
231
252
|
is_required = not type_info.nullable
|
|
232
253
|
if is_required and actual_arg.value_type.get("nullable", False):
|
|
233
254
|
potentially_missing_required_arg = True
|
|
@@ -302,20 +323,32 @@ def _register_op_factory(
|
|
|
302
323
|
if len(missing_args) > 0:
|
|
303
324
|
raise ValueError(f"Missing arguments: {', '.join(missing_args)}")
|
|
304
325
|
|
|
326
|
+
analyzed_expected_return_type = analyze_type_info(expected_return)
|
|
327
|
+
self._result_encoder = make_engine_value_encoder(
|
|
328
|
+
analyzed_expected_return_type
|
|
329
|
+
)
|
|
330
|
+
|
|
305
331
|
base_analyze_method = getattr(self._executor, "analyze", None)
|
|
306
332
|
if base_analyze_method is not None:
|
|
307
|
-
|
|
333
|
+
analyzed_result_type = analyze_type_info(base_analyze_method())
|
|
308
334
|
else:
|
|
309
|
-
|
|
335
|
+
if op_args.batching:
|
|
336
|
+
if not isinstance(
|
|
337
|
+
analyzed_expected_return_type.variant, AnalyzedListType
|
|
338
|
+
):
|
|
339
|
+
raise ValueError(
|
|
340
|
+
"Expected return type for batching function to be a list type"
|
|
341
|
+
)
|
|
342
|
+
analyzed_result_type = analyze_type_info(
|
|
343
|
+
analyzed_expected_return_type.variant.elem_type
|
|
344
|
+
)
|
|
345
|
+
else:
|
|
346
|
+
analyzed_result_type = analyzed_expected_return_type
|
|
310
347
|
if len(attributes) > 0:
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
analyzed_result_type_info = analyze_type_info(result_type)
|
|
314
|
-
encoded_type = encode_enriched_type_info(analyzed_result_type_info)
|
|
348
|
+
analyzed_result_type.attrs = attributes
|
|
315
349
|
if potentially_missing_required_arg:
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
self._result_encoder = make_engine_value_encoder(analyzed_result_type_info)
|
|
350
|
+
analyzed_result_type.nullable = True
|
|
351
|
+
encoded_type = encode_enriched_type_info(analyzed_result_type)
|
|
319
352
|
|
|
320
353
|
return encoded_type
|
|
321
354
|
|
|
@@ -359,7 +392,9 @@ def _register_op_factory(
|
|
|
359
392
|
|
|
360
393
|
if category == OpCategory.FUNCTION:
|
|
361
394
|
_engine.register_function_factory(
|
|
362
|
-
op_kind,
|
|
395
|
+
op_kind,
|
|
396
|
+
_EngineFunctionExecutorFactory(spec_loader, _WrappedExecutor),
|
|
397
|
+
op_args.batching,
|
|
363
398
|
)
|
|
364
399
|
else:
|
|
365
400
|
raise ValueError(f"Unsupported executor type {category}")
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module provides a standalone execution runtime for executing coroutines in a thread-safe
|
|
3
|
+
manner.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import threading
|
|
7
|
+
import asyncio
|
|
8
|
+
import inspect
|
|
9
|
+
import warnings
|
|
10
|
+
|
|
11
|
+
from typing import Any, Callable, Awaitable, TypeVar, Coroutine
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class _ExecutionContext:
|
|
17
|
+
_lock: threading.Lock
|
|
18
|
+
_event_loop: asyncio.AbstractEventLoop | None = None
|
|
19
|
+
|
|
20
|
+
def __init__(self) -> None:
|
|
21
|
+
self._lock = threading.Lock()
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def event_loop(self) -> asyncio.AbstractEventLoop:
|
|
25
|
+
"""Get the event loop for the cocoindex library."""
|
|
26
|
+
with self._lock:
|
|
27
|
+
if self._event_loop is None:
|
|
28
|
+
loop = asyncio.new_event_loop()
|
|
29
|
+
self._event_loop = loop
|
|
30
|
+
|
|
31
|
+
def _runner(l: asyncio.AbstractEventLoop) -> None:
|
|
32
|
+
asyncio.set_event_loop(l)
|
|
33
|
+
l.run_forever()
|
|
34
|
+
|
|
35
|
+
threading.Thread(target=_runner, args=(loop,), daemon=True).start()
|
|
36
|
+
return self._event_loop
|
|
37
|
+
|
|
38
|
+
def run(self, coro: Coroutine[Any, Any, T]) -> T:
|
|
39
|
+
"""Run a coroutine in the event loop, blocking until it finishes. Return its result."""
|
|
40
|
+
try:
|
|
41
|
+
running_loop = asyncio.get_running_loop()
|
|
42
|
+
except RuntimeError:
|
|
43
|
+
running_loop = None
|
|
44
|
+
|
|
45
|
+
loop = self.event_loop
|
|
46
|
+
|
|
47
|
+
if running_loop is not None:
|
|
48
|
+
if running_loop is loop:
|
|
49
|
+
raise RuntimeError(
|
|
50
|
+
"CocoIndex sync API was called from inside CocoIndex's async context. "
|
|
51
|
+
"Use the async variant of this method instead."
|
|
52
|
+
)
|
|
53
|
+
warnings.warn(
|
|
54
|
+
"CocoIndex sync API was called inside an existing event loop. "
|
|
55
|
+
"This may block other tasks. Prefer the async method.",
|
|
56
|
+
RuntimeWarning,
|
|
57
|
+
stacklevel=2,
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
fut = asyncio.run_coroutine_threadsafe(coro, loop)
|
|
61
|
+
try:
|
|
62
|
+
return fut.result()
|
|
63
|
+
except KeyboardInterrupt:
|
|
64
|
+
fut.cancel()
|
|
65
|
+
raise
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
execution_context = _ExecutionContext()
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def to_async_call(call: Callable[..., Any]) -> Callable[..., Awaitable[Any]]:
|
|
72
|
+
if inspect.iscoroutinefunction(call):
|
|
73
|
+
return call
|
|
74
|
+
return lambda *args, **kwargs: asyncio.to_thread(lambda: call(*args, **kwargs))
|
|
@@ -19,7 +19,6 @@ import threading
|
|
|
19
19
|
import asyncio
|
|
20
20
|
import os
|
|
21
21
|
import time
|
|
22
|
-
import atexit
|
|
23
22
|
from .user_app_loader import load_user_app
|
|
24
23
|
from .runtime import execution_context
|
|
25
24
|
import logging
|
|
@@ -32,39 +31,14 @@ WATCHDOG_INTERVAL_SECONDS = 10.0
|
|
|
32
31
|
# ---------------------------------------------
|
|
33
32
|
_pool_lock = threading.Lock()
|
|
34
33
|
_pool: ProcessPoolExecutor | None = None
|
|
35
|
-
_pool_cleanup_registered = False
|
|
36
34
|
_user_apps: list[str] = []
|
|
37
35
|
_logger = logging.getLogger(__name__)
|
|
38
36
|
|
|
39
37
|
|
|
40
|
-
def shutdown_pool_at_exit() -> None:
|
|
41
|
-
"""Best-effort shutdown of the global ProcessPoolExecutor on interpreter exit."""
|
|
42
|
-
global _pool, _pool_cleanup_registered # pylint: disable=global-statement
|
|
43
|
-
with _pool_lock:
|
|
44
|
-
if _pool is not None:
|
|
45
|
-
try:
|
|
46
|
-
_pool.shutdown(wait=True, cancel_futures=True)
|
|
47
|
-
except Exception as e:
|
|
48
|
-
_logger.error(
|
|
49
|
-
"Error during ProcessPoolExecutor shutdown at exit: %s",
|
|
50
|
-
e,
|
|
51
|
-
exc_info=True,
|
|
52
|
-
)
|
|
53
|
-
finally:
|
|
54
|
-
_pool = None
|
|
55
|
-
_pool_cleanup_registered = False
|
|
56
|
-
|
|
57
|
-
|
|
58
38
|
def _get_pool() -> ProcessPoolExecutor:
|
|
59
|
-
global _pool
|
|
39
|
+
global _pool # pylint: disable=global-statement
|
|
60
40
|
with _pool_lock:
|
|
61
41
|
if _pool is None:
|
|
62
|
-
if not _pool_cleanup_registered:
|
|
63
|
-
# Register the shutdown at exit at creation time (rather than at import time)
|
|
64
|
-
# to make sure it's executed earlier in the shutdown sequence.
|
|
65
|
-
atexit.register(shutdown_pool_at_exit)
|
|
66
|
-
_pool_cleanup_registered = True
|
|
67
|
-
|
|
68
42
|
# Single worker process as requested
|
|
69
43
|
_pool = ProcessPoolExecutor(
|
|
70
44
|
max_workers=1,
|
|
@@ -10,7 +10,9 @@ use super::stats;
|
|
|
10
10
|
use futures::future::try_join_all;
|
|
11
11
|
use indicatif::ProgressBar;
|
|
12
12
|
use sqlx::PgPool;
|
|
13
|
+
use std::fmt::Write;
|
|
13
14
|
use tokio::{sync::watch, task::JoinSet, time::MissedTickBehavior};
|
|
15
|
+
use tokio_util::task::AbortOnDropHandle;
|
|
14
16
|
|
|
15
17
|
pub struct FlowLiveUpdaterUpdates {
|
|
16
18
|
pub active_sources: Vec<String>,
|
|
@@ -144,7 +146,6 @@ impl SourceUpdateTask {
|
|
|
144
146
|
futs.push(
|
|
145
147
|
{
|
|
146
148
|
let change_stream_stats = change_stream_stats.clone();
|
|
147
|
-
let pool = self.pool.clone();
|
|
148
149
|
let status_tx = self.status_tx.clone();
|
|
149
150
|
let operation_in_process_stats = self.operation_in_process_stats.clone();
|
|
150
151
|
async move {
|
|
@@ -229,7 +230,6 @@ impl SourceUpdateTask {
|
|
|
229
230
|
Some(move || async move {
|
|
230
231
|
SharedAckFn::ack(&shared_ack_fn).await
|
|
231
232
|
}),
|
|
232
|
-
pool.clone(),
|
|
233
233
|
),
|
|
234
234
|
);
|
|
235
235
|
}
|
|
@@ -252,7 +252,7 @@ impl SourceUpdateTask {
|
|
|
252
252
|
let curr_change_stream_stats = change_stream_stats.as_ref().clone();
|
|
253
253
|
let delta = curr_change_stream_stats.delta(&last_change_stream_stats);
|
|
254
254
|
if delta.has_any_change() {
|
|
255
|
-
task.report_stats(&delta, "change stream");
|
|
255
|
+
task.report_stats(&delta, "change stream", None);
|
|
256
256
|
last_change_stream_stats = curr_change_stream_stats;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -266,7 +266,7 @@ impl SourceUpdateTask {
|
|
|
266
266
|
async move {
|
|
267
267
|
let refresh_interval = import_op.refresh_options.refresh_interval;
|
|
268
268
|
|
|
269
|
-
task.
|
|
269
|
+
task.update_one_pass_with_error_logging(
|
|
270
270
|
source_indexing_context,
|
|
271
271
|
if refresh_interval.is_some() {
|
|
272
272
|
"initial interval update"
|
|
@@ -284,7 +284,7 @@ impl SourceUpdateTask {
|
|
|
284
284
|
loop {
|
|
285
285
|
interval.tick().await;
|
|
286
286
|
|
|
287
|
-
task.
|
|
287
|
+
task.update_one_pass_with_error_logging(
|
|
288
288
|
source_indexing_context,
|
|
289
289
|
"interval update",
|
|
290
290
|
super::source_indexer::UpdateOptions {
|
|
@@ -304,22 +304,30 @@ impl SourceUpdateTask {
|
|
|
304
304
|
Ok(())
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
fn report_stats(
|
|
307
|
+
fn report_stats(
|
|
308
|
+
&self,
|
|
309
|
+
stats: &stats::UpdateStats,
|
|
310
|
+
update_title: &str,
|
|
311
|
+
start_time: Option<std::time::Instant>,
|
|
312
|
+
) {
|
|
308
313
|
self.source_update_stats.merge(stats);
|
|
314
|
+
let mut message = format!(
|
|
315
|
+
"{}.{} ({update_title}): {stats}",
|
|
316
|
+
self.flow.flow_instance.name,
|
|
317
|
+
self.import_op().name
|
|
318
|
+
);
|
|
319
|
+
if let Some(start_time) = start_time {
|
|
320
|
+
write!(
|
|
321
|
+
&mut message,
|
|
322
|
+
" [processing time: {:.3}s]",
|
|
323
|
+
start_time.elapsed().as_secs_f64()
|
|
324
|
+
)
|
|
325
|
+
.expect("Failed to write to message");
|
|
326
|
+
}
|
|
309
327
|
if self.options.print_stats {
|
|
310
|
-
println!(
|
|
311
|
-
"{}.{} ({update_title}): {}",
|
|
312
|
-
self.flow.flow_instance.name,
|
|
313
|
-
self.import_op().name,
|
|
314
|
-
stats
|
|
315
|
-
);
|
|
328
|
+
println!("{message}");
|
|
316
329
|
} else {
|
|
317
|
-
trace!(
|
|
318
|
-
"{}.{} ({update_title}): {}",
|
|
319
|
-
self.flow.flow_instance.name,
|
|
320
|
-
self.import_op().name,
|
|
321
|
-
stats
|
|
322
|
-
);
|
|
330
|
+
trace!("{message}");
|
|
323
331
|
}
|
|
324
332
|
}
|
|
325
333
|
|
|
@@ -329,6 +337,7 @@ impl SourceUpdateTask {
|
|
|
329
337
|
update_title: &str,
|
|
330
338
|
update_options: super::source_indexer::UpdateOptions,
|
|
331
339
|
) -> Result<()> {
|
|
340
|
+
let now = std::time::Instant::now();
|
|
332
341
|
let update_stats = Arc::new(stats::UpdateStats::default());
|
|
333
342
|
|
|
334
343
|
// Spawn periodic stats reporting task if print_stats is enabled
|
|
@@ -364,14 +373,17 @@ impl SourceUpdateTask {
|
|
|
364
373
|
}
|
|
365
374
|
}
|
|
366
375
|
};
|
|
367
|
-
(
|
|
376
|
+
(
|
|
377
|
+
Some(AbortOnDropHandle::new(tokio::spawn(report_task))),
|
|
378
|
+
Some(pb),
|
|
379
|
+
)
|
|
368
380
|
} else {
|
|
369
381
|
(None, None)
|
|
370
382
|
};
|
|
371
383
|
|
|
372
384
|
// Run the actual update
|
|
373
385
|
let update_result = source_indexing_context
|
|
374
|
-
.update(&
|
|
386
|
+
.update(&update_stats, update_options)
|
|
375
387
|
.await
|
|
376
388
|
.with_context(|| {
|
|
377
389
|
format!(
|
|
@@ -401,11 +413,11 @@ impl SourceUpdateTask {
|
|
|
401
413
|
}
|
|
402
414
|
|
|
403
415
|
// Report final stats
|
|
404
|
-
self.report_stats(&update_stats, update_title);
|
|
416
|
+
self.report_stats(&update_stats, update_title, Some(now));
|
|
405
417
|
Ok(())
|
|
406
418
|
}
|
|
407
419
|
|
|
408
|
-
async fn
|
|
420
|
+
async fn update_one_pass_with_error_logging(
|
|
409
421
|
&self,
|
|
410
422
|
source_indexing_context: &Arc<SourceIndexingContext>,
|
|
411
423
|
update_title: &str,
|