flowcept 0.9.3__tar.gz → 0.9.4__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.
- {flowcept-0.9.3 → flowcept-0.9.4}/PKG-INFO +4 -1
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/api-reference.rst +52 -24
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/architecture.rst +1 -1
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/prov_capture.rst +5 -3
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/prov_storage.rst +6 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/pyproject.toml +1 -1
- {flowcept-0.9.3 → flowcept-0.9.4}/resources/sample_settings.yaml +1 -1
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/flowcept_ctx_manager.py +2 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/prompts/general_prompts.py +3 -2
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/prompts/in_memory_query_prompts.py +10 -1
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/tools/general_tools.py +15 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/tools/in_memory_queries/in_memory_queries_tools.py +5 -4
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/tools/in_memory_queries/pandas_agent_utils.py +1 -1
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowcept_api/flowcept_controller.py +1 -1
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/instrumentation/flowcept_loop.py +91 -20
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/version.py +1 -1
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/checks.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/create-release-n-publish.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/run-llm-tests.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/run-tests-all-dbs.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/run-tests-in-container.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/run-tests-kafka.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/run-tests-py313.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/run-tests-simple.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/run-tests.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/run_examples.sh +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.github/workflows/version_bumper.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.gitignore +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/.readthedocs.yaml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/CONTRIBUTING.md +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/LICENSE +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/Makefile +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/README.md +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/deployment/Dockerfile +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/deployment/compose-grafana.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/deployment/compose-kafka.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/deployment/compose-mofka.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/deployment/compose-mongo.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/deployment/compose.yml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/cli-reference.rst +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/conf.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/contributing.rst +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/img/architecture-diagram.png +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/img/flowcept-logo-dark.png +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/img/flowcept-logo.png +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/index.rst +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/quick_start.rst +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/schemas.rst +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/setup.rst +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/task_schema.rst +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/telemetry_capture.rst +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/docs/workflow_schema.rst +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/agents/a2a/README.md +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/agents/a2a/agent1.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/agents/a2a/agent2.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/agents/aec_agent_context_manager.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/agents/aec_agent_mock.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/agents/aec_prompts.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/agents/opt_driver_mock.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/consumers/ping_pong_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/consumers/simple_consumer.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/consumers/simple_publisher.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/convergence_loop_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/dask_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/distributed_consumer_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/instrumented_loop_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/instrumented_simple_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/llm_complex/README.md +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/llm_complex/custom_provenance_id_mapping.yaml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/llm_complex/llm_dataprep.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/llm_complex/llm_main_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/llm_complex/llm_model.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/llm_complex/llm_test_runner.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/mlflow_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/mqtt_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/single_layer_perceptron_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/start_here.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/tensorboard_example.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/unmanaged/main.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/examples/unmanaged/simple_task.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/notebooks/analytics.ipynb +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/notebooks/dask.ipynb +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/notebooks/dask_from_CLI.ipynb +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/notebooks/mlflow.ipynb +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/notebooks/reset_dask_nb_exec_counts.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/notebooks/tensorboard.ipynb +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/resources/mofka/bedrock_setup.sh +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/resources/mofka/consumer.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/resources/mofka/mofka-requirements.yaml +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/resources/mofka/mofka_config.json +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/resources/simple_redis_consumer.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/agent_client.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/agents_utils.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/dynamic_schema_tracker.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/flowcept_agent.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/gui/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/gui/agent_gui.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/gui/gui_utils.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/llms/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/llms/claude_gcp.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/llms/gemini25.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/prompts/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/tools/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/agents/tools/in_memory_queries/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/analytics/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/analytics/analytics_utils.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/analytics/data_augmentation.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/analytics/plot.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/cli.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/autoflush_buffer.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/docdb_dao/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/docdb_dao/docdb_dao_base.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/docdb_dao/lmdb_dao.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/docdb_dao/mongodb_dao.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/keyvalue_dao.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/mq_dao/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/mq_dao/mq_dao_base.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/mq_dao/mq_dao_kafka.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/mq_dao/mq_dao_mofka.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/mq_dao/mq_dao_redis.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/daos/redis_conn.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/flowcept_dataclasses/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/flowcept_dataclasses/base_settings_dataclasses.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/flowcept_dataclasses/task_object.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/flowcept_dataclasses/telemetry.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/flowcept_dataclasses/workflow_object.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/flowcept_logger.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/query_utils.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/settings_factory.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/task_data_preprocess.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/utils.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/commons/vocabulary.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/configs.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowcept_api/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowcept_api/db_api.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowcept_api/task_query_api.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowcept_webserver/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowcept_webserver/app.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowcept_webserver/resources/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowcept_webserver/resources/query_rsrc.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowcept_webserver/resources/task_messages_rsrc.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/base_interceptor.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/brokers/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/brokers/mqtt_interceptor.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/dask/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/dask/dask_dataclasses.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/dask/dask_interceptor.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/dask/dask_plugins.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/instrumentation_interceptor.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/interceptor_state_manager.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/mlflow/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/mlflow/interception_event_handler.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/mlflow/mlflow_dao.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/mlflow/mlflow_dataclasses.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/mlflow/mlflow_interceptor.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/tensorboard/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/tensorboard/tensorboard_dataclasses.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/adapters/tensorboard/tensorboard_interceptor.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/consumers/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/consumers/agent/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/consumers/agent/base_agent_context_manager.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/consumers/base_consumer.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/consumers/consumer_utils.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/consumers/document_inserter.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/flowceptor/telemetry_capture.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/instrumentation/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/instrumentation/flowcept_agent_task.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/instrumentation/flowcept_decorator.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/instrumentation/flowcept_task.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/instrumentation/flowcept_torch.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/src/flowcept/instrumentation/task_capture.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/adapters/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/adapters/dask_test_utils.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/adapters/test_broker.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/adapters/test_dask.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/adapters/test_dask_with_context_mgmt.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/adapters/test_file_observer.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/adapters/test_mlflow.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/adapters/test_tensorboard.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/api/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/api/db_api_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/api/flowcept_api_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/api/sample_data.json +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/api/sample_data_with_telemetry_and_rai.json +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/api/task_query_api_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/doc_db_inserter/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/doc_db_inserter/doc_db_inserter_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/instrumentation_tests/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/instrumentation_tests/flowcept_explicit_tasks.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/instrumentation_tests/flowcept_loop_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/instrumentation_tests/flowcept_task_decorator_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/instrumentation_tests/ml_tests/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/instrumentation_tests/ml_tests/dl_trainer.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/instrumentation_tests/ml_tests/ml_decorator_dask_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/instrumentation_tests/ml_tests/ml_decorator_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/misc_tests/__init__.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/misc_tests/log_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/misc_tests/singleton_test.py +0 -0
- {flowcept-0.9.3 → flowcept-0.9.4}/tests/misc_tests/telemetry_test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flowcept
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.4
|
|
4
4
|
Summary: Capture and query workflow provenance data using data observability
|
|
5
5
|
Author: Oak Ridge National Laboratory
|
|
6
6
|
License-Expression: MIT
|
|
@@ -25,6 +25,7 @@ Requires-Dist: gitpython; extra == 'all'
|
|
|
25
25
|
Requires-Dist: google-genai; extra == 'all'
|
|
26
26
|
Requires-Dist: jupyterlab; extra == 'all'
|
|
27
27
|
Requires-Dist: langchain-community; extra == 'all'
|
|
28
|
+
Requires-Dist: langchain-openai; extra == 'all'
|
|
28
29
|
Requires-Dist: lmdb; extra == 'all'
|
|
29
30
|
Requires-Dist: mcp[cli]; extra == 'all'
|
|
30
31
|
Requires-Dist: mlflow-skinny; extra == 'all'
|
|
@@ -85,11 +86,13 @@ Provides-Extra: kafka
|
|
|
85
86
|
Requires-Dist: confluent-kafka<=2.8.0; extra == 'kafka'
|
|
86
87
|
Provides-Extra: llm-agent
|
|
87
88
|
Requires-Dist: langchain-community; extra == 'llm-agent'
|
|
89
|
+
Requires-Dist: langchain-openai; extra == 'llm-agent'
|
|
88
90
|
Requires-Dist: mcp[cli]; extra == 'llm-agent'
|
|
89
91
|
Requires-Dist: streamlit; extra == 'llm-agent'
|
|
90
92
|
Provides-Extra: llm-google
|
|
91
93
|
Requires-Dist: google-genai; extra == 'llm-google'
|
|
92
94
|
Requires-Dist: langchain-community; extra == 'llm-google'
|
|
95
|
+
Requires-Dist: langchain-openai; extra == 'llm-google'
|
|
93
96
|
Requires-Dist: mcp[cli]; extra == 'llm-google'
|
|
94
97
|
Requires-Dist: streamlit; extra == 'llm-google'
|
|
95
98
|
Provides-Extra: lmdb
|
|
@@ -1,37 +1,27 @@
|
|
|
1
1
|
API Reference
|
|
2
2
|
=============
|
|
3
3
|
|
|
4
|
-
..
|
|
5
|
-
:
|
|
6
|
-
:
|
|
4
|
+
.. autosummary::
|
|
5
|
+
:toctree: generated/
|
|
6
|
+
:recursive:
|
|
7
7
|
|
|
8
|
+
flowcept.Flowcept
|
|
9
|
+
flowcept.flowcept_api.db_api.DBAPI
|
|
10
|
+
flowcept.TaskObject
|
|
11
|
+
flowcept.WorkflowObject
|
|
12
|
+
flowcept.FlowceptTask
|
|
13
|
+
flowcept.FlowceptLoop
|
|
14
|
+
flowcept.FlowceptLightweightLoop
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Core components
|
|
12
|
-
---------------
|
|
16
|
+
Main Flowcept Object
|
|
17
|
+
--------------------
|
|
13
18
|
|
|
14
19
|
.. autoclass:: flowcept.Flowcept
|
|
15
20
|
:members:
|
|
21
|
+
:special-members: __init__
|
|
22
|
+
:exclude-members: __weakref__, __dict__, __module__
|
|
16
23
|
|
|
17
24
|
|
|
18
|
-
Main Message Objects
|
|
19
|
-
---------------------
|
|
20
|
-
|
|
21
|
-
.. autoclass:: flowcept.TaskObject
|
|
22
|
-
:members:
|
|
23
|
-
|
|
24
|
-
.. autoclass:: flowcept.WorkflowObject
|
|
25
|
-
:members:
|
|
26
|
-
|
|
27
|
-
FlowceptTask object
|
|
28
|
-
-------------------
|
|
29
|
-
|
|
30
|
-
.. autoclass:: flowcept.FlowceptTask
|
|
31
|
-
:members:
|
|
32
|
-
:special-members: __init__
|
|
33
|
-
:undoc-members:
|
|
34
|
-
:show-inheritance:
|
|
35
25
|
|
|
36
26
|
Flowcept.db: Querying the Database
|
|
37
27
|
----------------------------------
|
|
@@ -58,4 +48,42 @@ Typical usage:
|
|
|
58
48
|
.. autoclass:: flowcept.flowcept_api.db_api.DBAPI
|
|
59
49
|
:members:
|
|
60
50
|
:undoc-members:
|
|
51
|
+
:show-inheritance:
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
Main Message Objects
|
|
55
|
+
---------------------
|
|
56
|
+
|
|
57
|
+
.. autoclass:: flowcept.TaskObject
|
|
58
|
+
:members:
|
|
59
|
+
|
|
60
|
+
.. autoclass:: flowcept.WorkflowObject
|
|
61
|
+
:members:
|
|
62
|
+
|
|
63
|
+
FlowceptTask object
|
|
64
|
+
-------------------
|
|
65
|
+
|
|
66
|
+
.. autoclass:: flowcept.FlowceptTask
|
|
67
|
+
:members:
|
|
68
|
+
:special-members: __init__
|
|
69
|
+
:undoc-members:
|
|
70
|
+
:show-inheritance:
|
|
71
|
+
|
|
72
|
+
FlowceptLoop object
|
|
73
|
+
-------------------
|
|
74
|
+
|
|
75
|
+
.. autoclass:: flowcept.FlowceptLoop
|
|
76
|
+
:members:
|
|
77
|
+
:special-members: __init__
|
|
78
|
+
:undoc-members:
|
|
79
|
+
:show-inheritance:
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
FlowceptLightweightLoop object
|
|
83
|
+
------------------------------
|
|
84
|
+
|
|
85
|
+
.. autoclass:: flowcept.FlowceptLightweightLoop
|
|
86
|
+
:members:
|
|
87
|
+
:special-members: __init__
|
|
88
|
+
:undoc-members:
|
|
61
89
|
:show-inheritance:
|
|
@@ -435,18 +435,20 @@ Requires an active workflow (``with Flowcept(...)`` or ``Flowcept().start()``).
|
|
|
435
435
|
with Flowcept(workflow_name="custom_tasks"):
|
|
436
436
|
# Context-managed publish
|
|
437
437
|
with FlowceptTask(activity_id="download", used={"url": "https://..."}) as t:
|
|
438
|
-
data = b"..."
|
|
439
|
-
t.
|
|
438
|
+
data = b"..." # Some binary data
|
|
439
|
+
t.end(data=data, generated={"bytes": len(data)})
|
|
440
440
|
|
|
441
441
|
# Or publish explicitly
|
|
442
442
|
task = FlowceptTask(activity_id="parse", used={"bytes": len(data)})
|
|
443
|
-
task.
|
|
443
|
+
task.end({"records": 42})
|
|
444
444
|
task.send() # publishes to MQ
|
|
445
445
|
|
|
446
446
|
**Notes**:
|
|
447
447
|
|
|
448
448
|
- Use **context** (``with FlowceptTask(...)``) *or* call ``send()`` explicitly.
|
|
449
449
|
- Flows publish to the MQ; persistence/queries require a DB (e.g., MongoDB).
|
|
450
|
+
- See also: `Consumer example <https://flowcept.readthedocs.io/en/latest/prov_storage.html#example-extending-the-base-consumer>`_
|
|
451
|
+
- See also: `Ping pong example via PubSub with Flowcept <https://github.com/ORNL/flowcept/blob/main/examples/consumers/ping_pong_example.py>`_
|
|
450
452
|
|
|
451
453
|
References & Examples
|
|
452
454
|
---------------------
|
|
@@ -84,6 +84,12 @@ This can serve as a template for building custom provenance consumers.
|
|
|
84
84
|
consumer = MyConsumer()
|
|
85
85
|
consumer.start(daemon=False)
|
|
86
86
|
|
|
87
|
+
**Notes**:
|
|
88
|
+
|
|
89
|
+
- See also: `Explicit publish example <file:///Users/rsr/Documents/GDrive/ORNL/dev/flowcept/docs/_build/html/prov_capture.html#custom-task-creation-fully-customizable>`_
|
|
90
|
+
- See also: `Ping pong example via PubSub with Flowcept <https://github.com/ORNL/flowcept/blob/main/examples/consumers/ping_pong_example.py>`_
|
|
91
|
+
|
|
92
|
+
|
|
87
93
|
|
|
88
94
|
Document Inserter
|
|
89
95
|
-----------------
|
|
@@ -65,7 +65,7 @@ mlflow = ["mlflow-skinny", "SQLAlchemy", "alembic", "watchdog", "cryptography"]
|
|
|
65
65
|
nvidia = ["nvidia-ml-py"]
|
|
66
66
|
mqtt = ["paho-mqtt"]
|
|
67
67
|
tensorboard = ["tensorboard", "tensorflow", "tbparse"]
|
|
68
|
-
llm_agent = ["mcp[cli]", "langchain_community", "streamlit"]
|
|
68
|
+
llm_agent = ["mcp[cli]", "langchain_community", "streamlit", "langchain_openai"]
|
|
69
69
|
llm_google = ["flowcept[llm_agent]", "google-genai"]
|
|
70
70
|
|
|
71
71
|
dev = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
flowcept_version: 0.9.
|
|
1
|
+
flowcept_version: 0.9.4 # Version of the Flowcept package. This setting file is compatible with this version.
|
|
2
2
|
|
|
3
3
|
project:
|
|
4
4
|
debug: true # Toggle debug mode. This will add a property `debug: true` to all saved data, making it easier to retrieve/delete them later.
|
|
@@ -37,6 +37,7 @@ class FlowceptAppContext(BaseAppContext):
|
|
|
37
37
|
tasks_schema: Dict | None # TODO: we dont need to keep the tasks_schema in context, just in the manager's memory.
|
|
38
38
|
value_examples: Dict | None
|
|
39
39
|
tracker_config: Dict | None
|
|
40
|
+
custom_guidance: List[str] | None
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
class FlowceptAgentContextManager(BaseAgentContextManager):
|
|
@@ -156,6 +157,7 @@ class FlowceptAgentContextManager(BaseAgentContextManager):
|
|
|
156
157
|
df=pd.DataFrame(),
|
|
157
158
|
tasks_schema={},
|
|
158
159
|
value_examples={},
|
|
160
|
+
custom_guidance=[],
|
|
159
161
|
tracker_config=self.tracker_config,
|
|
160
162
|
)
|
|
161
163
|
DEBUG = True # TODO debugging!
|
|
@@ -24,8 +24,9 @@ ROUTING_PROMPT = (
|
|
|
24
24
|
"Given the following user message, classify it into one of the following routes:\n"
|
|
25
25
|
"- small_talk: if it's casual conversation or some random word (e.g., 'hausdn', 'a', hello, how are you, what can you do, what's your name)\n"
|
|
26
26
|
"- plot: if user is requesting plots (e.g., plot, chart, visualize)\n"
|
|
27
|
-
"- in_context_query: if the user asks questions about tasks or data in running workflow (or a workflow that ran recently) or if the user mentions the in-memory 'df' or a dataframe.\n"
|
|
28
|
-
"-
|
|
27
|
+
#"- in_context_query: if the user asks questions about tasks or data in running workflow (or a workflow that ran recently) or if the user mentions the in-memory 'df' or a dataframe.\n"
|
|
28
|
+
"- in_context_query: if the user is querying the provenance data questions about tasks or data in running workflow (or a workflow that ran recently) or if the user mentions the in-memory 'df' or a dataframe.\n"
|
|
29
|
+
#"- historical_prov_query: if the user wants to query historical provenance data\n"
|
|
29
30
|
"- in_chat_query: if the user appears to be asking about something that has said recently in this chat.\n"
|
|
30
31
|
"- unknown: if you don't know.\n"
|
|
31
32
|
"Respond with only the route label."
|
|
@@ -220,7 +220,15 @@ OUTPUT_FORMATTING = """
|
|
|
220
220
|
"""
|
|
221
221
|
|
|
222
222
|
|
|
223
|
-
def generate_pandas_code_prompt(query: str, dynamic_schema, example_values):
|
|
223
|
+
def generate_pandas_code_prompt(query: str, dynamic_schema, example_values, custom_user_guidances):
|
|
224
|
+
if custom_user_guidances is not None and isinstance(custom_user_guidances, list) and len(custom_user_guidances):
|
|
225
|
+
concatenated_guidance = "\n".join(f"- {msg}" for msg in custom_user_guidances)
|
|
226
|
+
custom_user_guidance_prompt = (f"You MUST consider the following guidance from the user:\n"
|
|
227
|
+
f"{concatenated_guidance}"
|
|
228
|
+
"------------------------------------------------------"
|
|
229
|
+
)
|
|
230
|
+
else:
|
|
231
|
+
custom_user_guidance_prompt = ""
|
|
224
232
|
prompt = (
|
|
225
233
|
f"{ROLE}"
|
|
226
234
|
f"{JOB}"
|
|
@@ -228,6 +236,7 @@ def generate_pandas_code_prompt(query: str, dynamic_schema, example_values):
|
|
|
228
236
|
f"{get_df_schema_prompt(dynamic_schema, example_values)}" # main tester
|
|
229
237
|
f"{QUERY_GUIDELINES}" # main tester
|
|
230
238
|
f"{FEW_SHOTS}" # main tester
|
|
239
|
+
f"{custom_user_guidance_prompt}"
|
|
231
240
|
f"{OUTPUT_FORMATTING}"
|
|
232
241
|
"User Query:"
|
|
233
242
|
f"{query}"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
+
from typing import List
|
|
2
3
|
|
|
3
4
|
from flowcept.agents.agents_utils import build_llm_model, ToolResult
|
|
4
5
|
from flowcept.agents.flowcept_ctx_manager import mcp_flowcept
|
|
@@ -59,6 +60,16 @@ def check_llm() -> str:
|
|
|
59
60
|
return response
|
|
60
61
|
|
|
61
62
|
|
|
63
|
+
@mcp_flowcept.tool()
|
|
64
|
+
def record_guidance(message: str) -> ToolResult:
|
|
65
|
+
ctx = mcp_flowcept.get_context()
|
|
66
|
+
message = message.replace("@record", "")
|
|
67
|
+
custom_guidance: List = ctx.request_context.lifespan_context.custom_guidance
|
|
68
|
+
custom_guidance.append(message)
|
|
69
|
+
|
|
70
|
+
return ToolResult(code=201, result=f"Ok. I recorded in my memory: {message}")
|
|
71
|
+
|
|
72
|
+
|
|
62
73
|
@mcp_flowcept.tool()
|
|
63
74
|
def prompt_handler(message: str) -> ToolResult:
|
|
64
75
|
"""
|
|
@@ -79,6 +90,10 @@ def prompt_handler(message: str) -> ToolResult:
|
|
|
79
90
|
if key in message:
|
|
80
91
|
return run_df_query(llm=None, query=message, plot=False)
|
|
81
92
|
|
|
93
|
+
if "@record" in message:
|
|
94
|
+
return record_guidance(message)
|
|
95
|
+
|
|
96
|
+
|
|
82
97
|
llm = build_llm_model()
|
|
83
98
|
|
|
84
99
|
prompt = ROUTING_PROMPT + message
|
|
@@ -87,6 +87,7 @@ def run_df_query(llm, query: str, plot=False) -> ToolResult:
|
|
|
87
87
|
df: pd.DataFrame = ctx.request_context.lifespan_context.df
|
|
88
88
|
schema = ctx.request_context.lifespan_context.tasks_schema
|
|
89
89
|
value_examples = ctx.request_context.lifespan_context.value_examples
|
|
90
|
+
custom_user_guidance = ctx.request_context.lifespan_context.custom_guidance
|
|
90
91
|
if df is None or not len(df):
|
|
91
92
|
return ToolResult(code=404, result="Current df is empty or null.")
|
|
92
93
|
|
|
@@ -99,9 +100,9 @@ def run_df_query(llm, query: str, plot=False) -> ToolResult:
|
|
|
99
100
|
return run_df_code(user_code=query, df=df)
|
|
100
101
|
|
|
101
102
|
if plot:
|
|
102
|
-
return generate_plot_code(llm, query, schema, value_examples, df)
|
|
103
|
+
return generate_plot_code(llm, query, schema, value_examples, df, custom_user_guidance=custom_user_guidance)
|
|
103
104
|
else:
|
|
104
|
-
return generate_result_df(llm, query, schema, value_examples, df)
|
|
105
|
+
return generate_result_df(llm, query, schema, value_examples, df, custom_user_guidance=custom_user_guidance)
|
|
105
106
|
|
|
106
107
|
|
|
107
108
|
@mcp_flowcept.tool()
|
|
@@ -221,7 +222,7 @@ def generate_plot_code(llm, query, dynamic_schema, value_examples, df) -> ToolRe
|
|
|
221
222
|
|
|
222
223
|
|
|
223
224
|
@mcp_flowcept.tool()
|
|
224
|
-
def generate_result_df(llm, query: str, dynamic_schema, example_values, df, attempt_fix=True, summarize=True):
|
|
225
|
+
def generate_result_df(llm, query: str, dynamic_schema, example_values, df, custom_user_guidance=None, attempt_fix=True, summarize=True):
|
|
225
226
|
"""
|
|
226
227
|
Generate a result DataFrame from a natural language query using an LLM.
|
|
227
228
|
|
|
@@ -297,7 +298,7 @@ def generate_result_df(llm, query: str, dynamic_schema, example_values, df, atte
|
|
|
297
298
|
if llm is None:
|
|
298
299
|
llm = build_llm_model()
|
|
299
300
|
try:
|
|
300
|
-
prompt = generate_pandas_code_prompt(query, dynamic_schema, example_values)
|
|
301
|
+
prompt = generate_pandas_code_prompt(query, dynamic_schema, example_values, custom_user_guidance)
|
|
301
302
|
response = llm(prompt)
|
|
302
303
|
except Exception as e:
|
|
303
304
|
return ToolResult(code=400, result=str(e), extra=prompt)
|
|
@@ -25,7 +25,7 @@ from flowcept.flowceptor.adapters.base_interceptor import BaseInterceptor
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class Flowcept(object):
|
|
28
|
-
"""Flowcept
|
|
28
|
+
"""Main Flowcept controller class."""
|
|
29
29
|
|
|
30
30
|
_db = None
|
|
31
31
|
# TODO: rename current_workflow_id to workflow_id. This will be a major refactor
|
|
@@ -18,26 +18,6 @@ class FlowceptLoop:
|
|
|
18
18
|
while capturing metadata for each iteration and for the loop as a whole. This is particularly
|
|
19
19
|
useful in scenarios where tracking and instrumentation of loop executions is required.
|
|
20
20
|
|
|
21
|
-
Parameters
|
|
22
|
-
----------
|
|
23
|
-
items : typing.Union[Sized, int, Iterator]
|
|
24
|
-
The items to iterate over. Must either be an iterable with a `__len__` method or an integer
|
|
25
|
-
representing the range of iteration.
|
|
26
|
-
loop_name : str, optional
|
|
27
|
-
A descriptive name for the loop (default is "loop").
|
|
28
|
-
item_name : str, optional
|
|
29
|
-
The name used for each item in the telemetry (default is "item").
|
|
30
|
-
parent_task_id : str, optional
|
|
31
|
-
The ID of the parent task associated with the loop, if applicable (default is None).
|
|
32
|
-
workflow_id : str, optional
|
|
33
|
-
The workflow ID to associate with this loop. If not provided, it will be generated or
|
|
34
|
-
inferred from the current workflow context.
|
|
35
|
-
|
|
36
|
-
Raises
|
|
37
|
-
------
|
|
38
|
-
Exception
|
|
39
|
-
If `items` is not an iterable with a `__len__` method or an integer.
|
|
40
|
-
|
|
41
21
|
Notes
|
|
42
22
|
-----
|
|
43
23
|
This class integrates with the `Flowcept` system for telemetry and tracking, ensuring
|
|
@@ -57,6 +37,52 @@ class FlowceptLoop:
|
|
|
57
37
|
items_length=0,
|
|
58
38
|
capture_enabled=True,
|
|
59
39
|
):
|
|
40
|
+
"""
|
|
41
|
+
Initialize a FlowceptLoop instance for tracking iterations.
|
|
42
|
+
|
|
43
|
+
This constructor wraps an iterable, numeric range, or explicit iterator into a
|
|
44
|
+
loop context where each iteration is instrumented with provenance and optional
|
|
45
|
+
telemetry. If instrumentation is disabled, the loop behaves like a normal
|
|
46
|
+
Python iterator with minimal overhead.
|
|
47
|
+
|
|
48
|
+
Parameters
|
|
49
|
+
----------
|
|
50
|
+
items : Union[Sized, Iterator, int]
|
|
51
|
+
The items to iterate over. Can be:
|
|
52
|
+
- A sized iterable (e.g., list, range).
|
|
53
|
+
- An integer (interpreted as ``range(items)``).
|
|
54
|
+
- An iterator (requires ``items_length`` if length cannot be inferred).
|
|
55
|
+
loop_name : str, optional
|
|
56
|
+
A descriptive name for the loop. Used in provenance as the loop's activity
|
|
57
|
+
identifier. Default is ``"loop"``.
|
|
58
|
+
item_name : str, optional
|
|
59
|
+
The key name under which each iteration's item is recorded in provenance.
|
|
60
|
+
Default is ``"item"``.
|
|
61
|
+
parent_task_id : str, optional
|
|
62
|
+
The identifier of a parent task, if this loop is nested within another task.
|
|
63
|
+
Default is ``None``.
|
|
64
|
+
workflow_id : str, optional
|
|
65
|
+
Identifier for the workflow this loop belongs to. If not provided, it is
|
|
66
|
+
inherited from the current Flowcept context or generated as a UUID.
|
|
67
|
+
items_length : int, optional
|
|
68
|
+
Explicit number of items if ``items`` is an iterator without a defined length.
|
|
69
|
+
Default is ``0``.
|
|
70
|
+
capture_enabled : bool, optional
|
|
71
|
+
Whether to enable provenance/telemetry capture. If ``False``, the loop runs
|
|
72
|
+
without instrumentation. Default is ``True``.
|
|
73
|
+
|
|
74
|
+
Raises
|
|
75
|
+
------
|
|
76
|
+
Exception
|
|
77
|
+
If ``items`` is not a supported type (sized iterable, integer, or iterator).
|
|
78
|
+
|
|
79
|
+
Notes
|
|
80
|
+
-----
|
|
81
|
+
- Each iteration is recorded with ``used`` (inputs) and optional ``generated``
|
|
82
|
+
values, plus telemetry if enabled.
|
|
83
|
+
- Iteration metadata is finalized at the end of each iteration and sent to the
|
|
84
|
+
active Flowcept interceptor.
|
|
85
|
+
"""
|
|
60
86
|
self._current_iteration_task = {}
|
|
61
87
|
if not (INSTRUMENTATION_ENABLED and capture_enabled):
|
|
62
88
|
# These do_nothing functions help reduce overhead if no instrumentation is needed
|
|
@@ -232,6 +258,51 @@ class FlowceptLightweightLoop:
|
|
|
232
258
|
items_length=0,
|
|
233
259
|
capture_enabled=True,
|
|
234
260
|
):
|
|
261
|
+
"""
|
|
262
|
+
Initialize a FlowceptLightweightLoop instance for tracking iterations.
|
|
263
|
+
|
|
264
|
+
This constructor provides a lower-overhead loop wrapper compared to
|
|
265
|
+
``FlowceptLoop``. Iterations are pre-registered as task objects, and capture
|
|
266
|
+
primarily updates ``used`` and ``generated`` fields as the loop progresses.
|
|
267
|
+
|
|
268
|
+
Parameters
|
|
269
|
+
----------
|
|
270
|
+
items : Union[Sized, Iterator]
|
|
271
|
+
The items to iterate over. Must either be:
|
|
272
|
+
- A sized iterable (with ``__len__``).
|
|
273
|
+
- An explicit iterator (length must be given by ``items_length``).
|
|
274
|
+
loop_name : str, optional
|
|
275
|
+
A descriptive name for the loop. Used in provenance as the loop's activity
|
|
276
|
+
identifier. Default is ``"loop"``.
|
|
277
|
+
item_name : str, optional
|
|
278
|
+
The key name under which each iteration's item is recorded in provenance.
|
|
279
|
+
Default is ``"item"``.
|
|
280
|
+
parent_task_id : str, optional
|
|
281
|
+
The identifier of a parent task, if this loop is nested within another task.
|
|
282
|
+
Default is ``None``.
|
|
283
|
+
workflow_id : str, optional
|
|
284
|
+
Identifier for the workflow this loop belongs to. If not provided, it is
|
|
285
|
+
inherited from the current Flowcept context or generated as a UUID.
|
|
286
|
+
items_length : int, optional
|
|
287
|
+
Explicit number of items if ``items`` is an iterator without a defined length.
|
|
288
|
+
Default is ``0``.
|
|
289
|
+
capture_enabled : bool, optional
|
|
290
|
+
Whether to enable provenance/telemetry capture. If ``False``, the loop runs
|
|
291
|
+
without instrumentation. Default is ``True``.
|
|
292
|
+
|
|
293
|
+
Raises
|
|
294
|
+
------
|
|
295
|
+
Exception
|
|
296
|
+
If ``items`` is neither a sized iterable nor an iterator.
|
|
297
|
+
|
|
298
|
+
Notes
|
|
299
|
+
-----
|
|
300
|
+
- This class is designed for high-performance scenarios with many iterations.
|
|
301
|
+
- Iteration tasks are pre-allocated, and provenance capture is batched via
|
|
302
|
+
the Flowcept interceptor.
|
|
303
|
+
- Compared to ``FlowceptLoop``, this class avoids per-iteration telemetry
|
|
304
|
+
overhead unless explicitly enabled.
|
|
305
|
+
"""
|
|
235
306
|
if isinstance(items, Iterator):
|
|
236
307
|
self._iterator = items
|
|
237
308
|
else:
|
|
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
|
|
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
|
|
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
|