nvidia-nat 1.2.0rc5__py3-none-any.whl → 1.2.0rc7__py3-none-any.whl
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.
- {aiq → nat}/agent/react_agent/agent.py +12 -12
- {aiq → nat}/agent/react_agent/register.py +20 -20
- {aiq → nat}/agent/reasoning_agent/reasoning_agent.py +14 -14
- {aiq → nat}/agent/rewoo_agent/agent.py +7 -7
- {aiq → nat}/agent/rewoo_agent/prompt.py +11 -12
- {aiq → nat}/agent/rewoo_agent/register.py +47 -49
- {aiq → nat}/agent/tool_calling_agent/agent.py +4 -4
- {aiq → nat}/agent/tool_calling_agent/register.py +8 -8
- {aiq → nat}/authentication/api_key/api_key_auth_provider.py +6 -6
- {aiq → nat}/authentication/api_key/api_key_auth_provider_config.py +5 -5
- {aiq → nat}/authentication/api_key/register.py +4 -4
- {aiq → nat}/authentication/http_basic_auth/http_basic_auth_provider.py +10 -10
- {aiq → nat}/authentication/http_basic_auth/register.py +4 -4
- {aiq → nat}/authentication/interfaces.py +6 -6
- {aiq → nat}/authentication/oauth2/oauth2_auth_code_flow_provider.py +11 -11
- {aiq → nat}/authentication/oauth2/oauth2_auth_code_flow_provider_config.py +1 -1
- {aiq → nat}/authentication/oauth2/register.py +4 -4
- {aiq → nat}/authentication/register.py +3 -3
- {aiq → nat}/builder/builder.py +30 -30
- {aiq → nat}/builder/component_utils.py +23 -23
- {aiq → nat}/builder/context.py +35 -29
- {aiq → nat}/builder/embedder.py +1 -1
- {aiq → nat}/builder/eval_builder.py +13 -13
- {aiq → nat}/builder/evaluator.py +3 -3
- {aiq → nat}/builder/front_end.py +11 -11
- {aiq → nat}/builder/function.py +8 -8
- {aiq → nat}/builder/function_base.py +6 -6
- {aiq → nat}/builder/function_info.py +3 -3
- {aiq → nat}/builder/intermediate_step_manager.py +13 -13
- {aiq → nat}/builder/llm.py +1 -1
- {aiq → nat}/builder/retriever.py +1 -1
- {aiq → nat}/builder/user_interaction_manager.py +14 -10
- {aiq → nat}/builder/workflow.py +25 -25
- {aiq → nat}/builder/workflow_builder.py +86 -86
- {aiq → nat}/cli/cli_utils/config_override.py +2 -2
- {aiq → nat}/cli/cli_utils/validation.py +4 -4
- {aiq → nat}/cli/commands/configure/channel/add.py +2 -2
- {aiq → nat}/cli/commands/configure/channel/channel.py +4 -6
- {aiq → nat}/cli/commands/configure/channel/remove.py +2 -2
- {aiq → nat}/cli/commands/configure/channel/update.py +2 -2
- {aiq → nat}/cli/commands/configure/configure.py +3 -3
- {aiq → nat}/cli/commands/evaluate.py +3 -3
- {aiq → nat}/cli/commands/info/info.py +5 -7
- {aiq → nat}/cli/commands/info/list_channels.py +1 -1
- {aiq → nat}/cli/commands/info/list_components.py +14 -14
- {aiq → nat}/cli/commands/info/list_mcp.py +106 -15
- {aiq → nat}/cli/commands/registry/publish.py +9 -9
- {aiq → nat}/cli/commands/registry/pull.py +10 -10
- {aiq → nat}/cli/commands/registry/registry.py +5 -7
- {aiq → nat}/cli/commands/registry/remove.py +8 -8
- {aiq → nat}/cli/commands/registry/search.py +15 -15
- {aiq → nat}/cli/commands/sizing/calc.py +3 -3
- {aiq → nat}/cli/commands/start.py +15 -15
- {aiq → nat}/cli/commands/uninstall.py +5 -5
- {aiq → nat}/cli/commands/validate.py +1 -1
- {aiq → nat}/cli/commands/workflow/templates/pyproject.toml.j2 +4 -4
- {aiq → nat}/cli/commands/workflow/templates/workflow.py.j2 +4 -4
- {aiq → nat}/cli/commands/workflow/workflow.py +3 -3
- {aiq → nat}/cli/commands/workflow/workflow_commands.py +15 -11
- {aiq → nat}/cli/entrypoint.py +6 -6
- {aiq → nat}/cli/main.py +15 -2
- {aiq → nat}/cli/register_workflow.py +70 -70
- {aiq → nat}/cli/type_registry.py +82 -82
- {aiq → nat}/data_models/api_server.py +121 -99
- {aiq → nat}/data_models/authentication.py +2 -2
- {aiq → nat}/data_models/component.py +5 -1
- {aiq → nat}/data_models/component_ref.py +12 -12
- {aiq → nat}/data_models/config.py +17 -13
- {aiq → nat}/data_models/dataset_handler.py +58 -12
- {aiq → nat}/data_models/discovery_metadata.py +36 -66
- {aiq → nat}/data_models/evaluate.py +9 -9
- {aiq → nat}/data_models/intermediate_step.py +7 -7
- {aiq → nat}/data_models/retriever.py +2 -2
- {aiq → nat}/data_models/span.py +10 -7
- {aiq → nat}/data_models/step_adaptor.py +1 -1
- {aiq → nat}/data_models/telemetry_exporter.py +2 -2
- {aiq → nat}/embedder/nim_embedder.py +5 -5
- {aiq → nat}/embedder/openai_embedder.py +5 -5
- {aiq/retriever → nat/embedder}/register.py +2 -2
- {aiq → nat}/eval/config.py +4 -4
- {aiq → nat}/eval/dataset_handler/dataset_downloader.py +1 -1
- {aiq → nat}/eval/dataset_handler/dataset_filter.py +1 -1
- {aiq → nat}/eval/dataset_handler/dataset_handler.py +127 -14
- {aiq → nat}/eval/evaluate.py +38 -34
- {aiq → nat}/eval/evaluator/base_evaluator.py +9 -5
- {aiq → nat}/eval/evaluator/evaluator_model.py +4 -4
- {aiq → nat}/eval/intermediate_step_adapter.py +2 -2
- {aiq → nat}/eval/rag_evaluator/evaluate.py +8 -8
- {aiq → nat}/eval/rag_evaluator/register.py +7 -7
- {aiq → nat}/eval/remote_workflow.py +8 -8
- {aiq → nat}/eval/runners/config.py +2 -2
- {aiq → nat}/eval/runners/multi_eval_runner.py +4 -4
- {aiq → nat}/eval/runtime_event_subscriber.py +3 -3
- {aiq → nat}/eval/swe_bench_evaluator/evaluate.py +6 -6
- {aiq → nat}/eval/swe_bench_evaluator/register.py +4 -4
- {aiq → nat}/eval/trajectory_evaluator/evaluate.py +5 -5
- {aiq → nat}/eval/trajectory_evaluator/register.py +5 -5
- {aiq → nat}/eval/tunable_rag_evaluator/evaluate.py +3 -3
- {aiq → nat}/eval/tunable_rag_evaluator/register.py +6 -6
- {aiq → nat}/eval/utils/output_uploader.py +1 -1
- {aiq → nat}/eval/utils/weave_eval.py +6 -6
- {aiq → nat}/experimental/decorators/experimental_warning_decorator.py +6 -2
- {aiq → nat}/experimental/test_time_compute/editing/iterative_plan_refinement_editor.py +10 -10
- {aiq → nat}/experimental/test_time_compute/editing/llm_as_a_judge_editor.py +10 -10
- {aiq → nat}/experimental/test_time_compute/editing/motivation_aware_summarization.py +10 -10
- {aiq → nat}/experimental/test_time_compute/functions/execute_score_select_function.py +10 -10
- {aiq → nat}/experimental/test_time_compute/functions/plan_select_execute_function.py +17 -17
- aiq/experimental/test_time_compute/functions/its_tool_orchestration_function.py → nat/experimental/test_time_compute/functions/ttc_tool_orchestration_function.py +12 -12
- aiq/experimental/test_time_compute/functions/its_tool_wrapper_function.py → nat/experimental/test_time_compute/functions/ttc_tool_wrapper_function.py +10 -10
- {aiq → nat}/experimental/test_time_compute/models/editor_config.py +2 -2
- {aiq → nat}/experimental/test_time_compute/models/scoring_config.py +2 -2
- {aiq → nat}/experimental/test_time_compute/models/search_config.py +2 -2
- {aiq → nat}/experimental/test_time_compute/models/selection_config.py +2 -2
- {aiq → nat}/experimental/test_time_compute/models/strategy_base.py +4 -4
- {aiq → nat}/experimental/test_time_compute/register.py +2 -2
- {aiq → nat}/experimental/test_time_compute/scoring/llm_based_agent_scorer.py +11 -11
- {aiq → nat}/experimental/test_time_compute/scoring/llm_based_plan_scorer.py +11 -11
- {aiq → nat}/experimental/test_time_compute/scoring/motivation_aware_scorer.py +10 -10
- {aiq → nat}/experimental/test_time_compute/search/multi_llm_planner.py +10 -10
- {aiq → nat}/experimental/test_time_compute/search/multi_query_retrieval_search.py +10 -10
- {aiq → nat}/experimental/test_time_compute/search/single_shot_multi_plan_planner.py +11 -11
- {aiq → nat}/experimental/test_time_compute/selection/best_of_n_selector.py +7 -7
- {aiq → nat}/experimental/test_time_compute/selection/llm_based_agent_output_selector.py +11 -11
- {aiq → nat}/experimental/test_time_compute/selection/llm_based_output_merging_selector.py +11 -11
- {aiq → nat}/experimental/test_time_compute/selection/llm_based_plan_selector.py +11 -11
- {aiq → nat}/experimental/test_time_compute/selection/threshold_selector.py +7 -7
- {aiq → nat}/front_ends/console/authentication_flow_handler.py +6 -6
- {aiq → nat}/front_ends/console/console_front_end_config.py +2 -2
- {aiq → nat}/front_ends/console/console_front_end_plugin.py +9 -9
- {aiq → nat}/front_ends/console/register.py +5 -5
- {aiq → nat}/front_ends/fastapi/auth_flow_handlers/http_flow_handler.py +4 -4
- {aiq → nat}/front_ends/fastapi/auth_flow_handlers/websocket_flow_handler.py +6 -6
- {aiq → nat}/front_ends/fastapi/fastapi_front_end_config.py +22 -15
- {aiq → nat}/front_ends/fastapi/fastapi_front_end_plugin.py +10 -10
- {aiq → nat}/front_ends/fastapi/fastapi_front_end_plugin_worker.py +110 -115
- {aiq → nat}/front_ends/fastapi/intermediate_steps_subscriber.py +10 -10
- {aiq → nat}/front_ends/fastapi/main.py +8 -8
- {aiq → nat}/front_ends/fastapi/message_handler.py +58 -36
- {aiq → nat}/front_ends/fastapi/message_validator.py +55 -48
- {aiq → nat}/front_ends/fastapi/register.py +5 -5
- {aiq → nat}/front_ends/fastapi/response_helpers.py +26 -26
- {aiq → nat}/front_ends/fastapi/step_adaptor.py +35 -37
- {aiq → nat}/front_ends/mcp/mcp_front_end_config.py +12 -8
- nat/front_ends/mcp/mcp_front_end_plugin.py +81 -0
- nat/front_ends/mcp/mcp_front_end_plugin_worker.py +143 -0
- {aiq → nat}/front_ends/mcp/register.py +5 -5
- {aiq → nat}/front_ends/mcp/tool_converter.py +20 -21
- {aiq → nat}/front_ends/simple_base/simple_front_end_plugin_base.py +6 -6
- {aiq → nat}/llm/aws_bedrock_llm.py +5 -5
- {aiq → nat}/llm/nim_llm.py +5 -5
- {aiq → nat}/llm/openai_llm.py +5 -5
- {aiq → nat}/memory/__init__.py +2 -2
- nat/meta/pypi.md +58 -0
- {aiq → nat}/object_store/__init__.py +2 -2
- {aiq → nat}/object_store/in_memory_object_store.py +6 -6
- {aiq → nat}/observability/exporter/base_exporter.py +9 -9
- {aiq → nat}/observability/exporter/exporter.py +1 -1
- {aiq → nat}/observability/exporter/file_exporter.py +6 -6
- {aiq → nat}/observability/exporter/processing_exporter.py +9 -9
- {aiq → nat}/observability/exporter/raw_exporter.py +4 -4
- {aiq → nat}/observability/exporter/span_exporter.py +57 -34
- {aiq → nat}/observability/exporter_manager.py +6 -6
- {aiq → nat}/observability/mixin/file_mixin.py +2 -2
- {aiq → nat}/observability/processor/batching_processor.py +1 -1
- {aiq → nat}/observability/processor/callback_processor.py +1 -1
- {aiq → nat}/observability/processor/intermediate_step_serializer.py +4 -4
- {aiq → nat}/observability/processor/processor.py +1 -1
- {aiq → nat}/observability/register.py +7 -7
- {aiq → nat}/profiler/calc/calc_runner.py +18 -18
- {aiq → nat}/profiler/calc/calculations.py +3 -3
- {aiq → nat}/profiler/calc/plot.py +2 -2
- {aiq → nat}/profiler/callbacks/agno_callback_handler.py +14 -14
- {aiq → nat}/profiler/callbacks/langchain_callback_handler.py +11 -11
- {aiq → nat}/profiler/callbacks/llama_index_callback_handler.py +12 -12
- {aiq → nat}/profiler/callbacks/semantic_kernel_callback_handler.py +11 -11
- {aiq → nat}/profiler/data_models.py +2 -2
- {aiq → nat}/profiler/decorators/framework_wrapper.py +6 -6
- {aiq → nat}/profiler/decorators/function_tracking.py +10 -10
- {aiq → nat}/profiler/forecasting/model_trainer.py +5 -5
- {aiq → nat}/profiler/forecasting/models/linear_model.py +5 -4
- {aiq → nat}/profiler/forecasting/models/random_forest_regressor.py +5 -4
- {aiq → nat}/profiler/inference_optimization/bottleneck_analysis/nested_stack_analysis.py +7 -7
- {aiq → nat}/profiler/inference_optimization/bottleneck_analysis/simple_stack_analysis.py +4 -4
- {aiq → nat}/profiler/inference_optimization/experimental/concurrency_spike_analysis.py +6 -6
- {aiq → nat}/profiler/inference_optimization/experimental/prefix_span_analysis.py +6 -6
- {aiq → nat}/profiler/inference_optimization/llm_metrics.py +2 -2
- {aiq → nat}/profiler/inference_optimization/prompt_caching.py +5 -5
- {aiq → nat}/profiler/inference_optimization/token_uniqueness.py +4 -4
- {aiq → nat}/profiler/inference_optimization/workflow_runtimes.py +3 -3
- {aiq → nat}/profiler/intermediate_property_adapter.py +3 -3
- {aiq → nat}/profiler/profile_runner.py +17 -17
- {aiq → nat}/profiler/utils.py +4 -4
- {aiq → nat}/registry_handlers/local/local_handler.py +19 -19
- {aiq → nat}/registry_handlers/local/register_local.py +4 -4
- {aiq → nat}/registry_handlers/metadata_factory.py +7 -7
- {aiq → nat}/registry_handlers/package_utils.py +37 -33
- {aiq → nat}/registry_handlers/pypi/pypi_handler.py +21 -21
- {aiq → nat}/registry_handlers/pypi/register_pypi.py +6 -6
- {aiq → nat}/registry_handlers/registry_handler_base.py +21 -21
- {aiq → nat}/registry_handlers/rest/register_rest.py +7 -7
- {aiq → nat}/registry_handlers/rest/rest_handler.py +19 -19
- {aiq → nat}/registry_handlers/schemas/package.py +3 -3
- {aiq → nat}/registry_handlers/schemas/publish.py +17 -12
- {aiq → nat}/registry_handlers/schemas/pull.py +6 -6
- {aiq → nat}/registry_handlers/schemas/remove.py +2 -2
- {aiq → nat}/registry_handlers/schemas/search.py +11 -11
- {aiq → nat}/retriever/interface.py +6 -2
- {aiq → nat}/retriever/milvus/register.py +7 -7
- {aiq → nat}/retriever/milvus/retriever.py +8 -8
- {aiq → nat}/retriever/models.py +10 -7
- {aiq → nat}/retriever/nemo_retriever/register.py +6 -6
- {aiq → nat}/retriever/nemo_retriever/retriever.py +10 -10
- {aiq/embedder → nat/retriever}/register.py +2 -4
- {aiq → nat}/runtime/loader.py +38 -33
- {aiq → nat}/runtime/runner.py +30 -25
- {aiq → nat}/runtime/session.py +19 -15
- {aiq → nat}/runtime/user_metadata.py +1 -1
- {aiq → nat}/settings/global_settings.py +11 -11
- {aiq → nat}/tool/chat_completion.py +6 -6
- {aiq → nat}/tool/code_execution/README.md +2 -2
- {aiq → nat}/tool/code_execution/code_sandbox.py +1 -1
- {aiq → nat}/tool/code_execution/register.py +5 -5
- {aiq → nat}/tool/code_execution/test_code_execution_sandbox.py +1 -1
- {aiq → nat}/tool/datetime_tools.py +4 -4
- {aiq → nat}/tool/document_search.py +6 -6
- {aiq → nat}/tool/github_tools/create_github_commit.py +4 -4
- {aiq → nat}/tool/github_tools/create_github_issue.py +4 -4
- {aiq → nat}/tool/github_tools/create_github_pr.py +4 -4
- {aiq → nat}/tool/github_tools/get_github_file.py +4 -4
- {aiq → nat}/tool/github_tools/get_github_issue.py +4 -4
- {aiq → nat}/tool/github_tools/get_github_pr.py +4 -4
- {aiq → nat}/tool/github_tools/update_github_issue.py +4 -4
- {aiq → nat}/tool/mcp/exceptions.py +1 -1
- {aiq → nat}/tool/mcp/mcp_client.py +2 -2
- {aiq → nat}/tool/mcp/mcp_tool.py +7 -7
- {aiq → nat}/tool/memory_tools/add_memory_tool.py +6 -6
- {aiq → nat}/tool/memory_tools/delete_memory_tool.py +6 -6
- {aiq → nat}/tool/memory_tools/get_memory_tool.py +6 -6
- {aiq → nat}/tool/nvidia_rag.py +4 -4
- {aiq → nat}/tool/retriever.py +20 -15
- {aiq → nat}/tool/server_tools.py +16 -16
- {aiq → nat}/utils/dump_distro_mapping.py +2 -2
- {aiq → nat}/utils/exception_handlers/mcp.py +8 -8
- {aiq → nat}/utils/io/yaml_tools.py +1 -1
- {aiq → nat}/utils/metadata_utils.py +2 -2
- {aiq → nat}/utils/reactive/base/observable_base.py +2 -2
- {aiq → nat}/utils/reactive/base/subject_base.py +1 -1
- {aiq → nat}/utils/reactive/observable.py +5 -5
- {aiq → nat}/utils/reactive/observer.py +1 -1
- {aiq → nat}/utils/reactive/subject.py +4 -4
- {aiq → nat}/utils/reactive/subscription.py +1 -1
- {aiq → nat}/utils/settings/global_settings.py +4 -4
- {aiq → nat}/utils/type_converter.py +1 -1
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc7.dist-info}/METADATA +37 -37
- nvidia_nat-1.2.0rc7.dist-info/RECORD +434 -0
- nvidia_nat-1.2.0rc7.dist-info/entry_points.txt +21 -0
- nvidia_nat-1.2.0rc7.dist-info/top_level.txt +1 -0
- aiq/embedder/langchain_client.py +0 -41
- aiq/front_ends/mcp/mcp_front_end_plugin.py +0 -93
- aiq/meta/module_to_distro.json +0 -3
- aiq/meta/pypi.md +0 -58
- nvidia_nat-1.2.0rc5.dist-info/RECORD +0 -435
- nvidia_nat-1.2.0rc5.dist-info/entry_points.txt +0 -20
- nvidia_nat-1.2.0rc5.dist-info/top_level.txt +0 -1
- {aiq → nat}/agent/__init__.py +0 -0
- {aiq → nat}/agent/base.py +0 -0
- {aiq → nat}/agent/dual_node.py +0 -0
- {aiq → nat}/agent/react_agent/__init__.py +0 -0
- {aiq → nat}/agent/react_agent/output_parser.py +0 -0
- {aiq → nat}/agent/react_agent/prompt.py +0 -0
- {aiq → nat}/agent/reasoning_agent/__init__.py +0 -0
- {aiq → nat}/agent/register.py +0 -0
- {aiq → nat}/agent/rewoo_agent/__init__.py +0 -0
- {aiq → nat}/agent/tool_calling_agent/__init__.py +0 -0
- {aiq → nat}/authentication/__init__.py +0 -0
- {aiq → nat}/authentication/api_key/__init__.py +0 -0
- {aiq → nat}/authentication/exceptions/__init__.py +0 -0
- {aiq → nat}/authentication/exceptions/api_key_exceptions.py +0 -0
- {aiq → nat}/authentication/http_basic_auth/__init__.py +0 -0
- {aiq → nat}/authentication/oauth2/__init__.py +0 -0
- {aiq → nat}/builder/__init__.py +0 -0
- {aiq → nat}/builder/framework_enum.py +0 -0
- {aiq → nat}/cli/__init__.py +0 -0
- {aiq → nat}/cli/cli_utils/__init__.py +0 -0
- {aiq → nat}/cli/commands/__init__.py +0 -0
- {aiq → nat}/cli/commands/configure/__init__.py +0 -0
- {aiq → nat}/cli/commands/configure/channel/__init__.py +0 -0
- {aiq → nat}/cli/commands/info/__init__.py +0 -0
- {aiq → nat}/cli/commands/registry/__init__.py +0 -0
- {aiq → nat}/cli/commands/sizing/__init__.py +0 -0
- {aiq → nat}/cli/commands/sizing/sizing.py +0 -0
- {aiq → nat}/cli/commands/workflow/__init__.py +0 -0
- {aiq → nat}/cli/commands/workflow/templates/__init__.py.j2 +0 -0
- {aiq → nat}/cli/commands/workflow/templates/config.yml.j2 +0 -0
- {aiq → nat}/cli/commands/workflow/templates/register.py.j2 +0 -0
- {aiq → nat}/data_models/__init__.py +0 -0
- {aiq → nat}/data_models/common.py +0 -0
- {aiq → nat}/data_models/embedder.py +0 -0
- {aiq → nat}/data_models/evaluator.py +0 -0
- {aiq → nat}/data_models/front_end.py +0 -0
- {aiq → nat}/data_models/function.py +0 -0
- {aiq → nat}/data_models/function_dependencies.py +0 -0
- {aiq → nat}/data_models/interactive.py +0 -0
- {aiq → nat}/data_models/invocation_node.py +0 -0
- {aiq → nat}/data_models/llm.py +0 -0
- {aiq → nat}/data_models/logging.py +0 -0
- {aiq → nat}/data_models/memory.py +0 -0
- {aiq → nat}/data_models/object_store.py +0 -0
- {aiq → nat}/data_models/profiler.py +0 -0
- {aiq → nat}/data_models/registry_handler.py +0 -0
- {aiq → nat}/data_models/retry_mixin.py +0 -0
- {aiq → nat}/data_models/streaming.py +0 -0
- {aiq → nat}/data_models/swe_bench_model.py +0 -0
- {aiq → nat}/data_models/ttc_strategy.py +0 -0
- {aiq → nat}/embedder/__init__.py +0 -0
- {aiq → nat}/eval/__init__.py +0 -0
- {aiq → nat}/eval/dataset_handler/__init__.py +0 -0
- {aiq → nat}/eval/evaluator/__init__.py +0 -0
- {aiq → nat}/eval/rag_evaluator/__init__.py +0 -0
- {aiq → nat}/eval/register.py +0 -0
- {aiq → nat}/eval/runners/__init__.py +0 -0
- {aiq → nat}/eval/swe_bench_evaluator/__init__.py +0 -0
- {aiq → nat}/eval/trajectory_evaluator/__init__.py +0 -0
- {aiq → nat}/eval/tunable_rag_evaluator/__init__.py +0 -0
- {aiq → nat}/eval/usage_stats.py +0 -0
- {aiq → nat}/eval/utils/__init__.py +0 -0
- {aiq → nat}/eval/utils/tqdm_position_registry.py +0 -0
- {aiq → nat}/experimental/__init__.py +0 -0
- {aiq → nat}/experimental/decorators/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/editing/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/functions/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/models/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/models/stage_enums.py +0 -0
- {aiq → nat}/experimental/test_time_compute/models/tool_use_config.py +0 -0
- {aiq → nat}/experimental/test_time_compute/models/ttc_item.py +0 -0
- {aiq → nat}/experimental/test_time_compute/scoring/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/search/__init__.py +0 -0
- {aiq → nat}/experimental/test_time_compute/selection/__init__.py +0 -0
- {aiq → nat}/front_ends/__init__.py +0 -0
- {aiq → nat}/front_ends/console/__init__.py +0 -0
- {aiq → nat}/front_ends/cron/__init__.py +0 -0
- {aiq → nat}/front_ends/fastapi/__init__.py +0 -0
- {aiq → nat}/front_ends/fastapi/auth_flow_handlers/__init__.py +0 -0
- {aiq → nat}/front_ends/fastapi/fastapi_front_end_controller.py +0 -0
- {aiq → nat}/front_ends/fastapi/html_snippets/__init__.py +0 -0
- {aiq → nat}/front_ends/fastapi/html_snippets/auth_code_grant_success.py +0 -0
- {aiq → nat}/front_ends/fastapi/job_store.py +0 -0
- {aiq → nat}/front_ends/mcp/__init__.py +0 -0
- {aiq → nat}/front_ends/register.py +0 -0
- {aiq → nat}/front_ends/simple_base/__init__.py +0 -0
- {aiq → nat}/llm/__init__.py +0 -0
- {aiq → nat}/llm/register.py +0 -0
- {aiq → nat}/llm/utils/__init__.py +0 -0
- {aiq → nat}/llm/utils/env_config_value.py +0 -0
- {aiq → nat}/llm/utils/error.py +0 -0
- {aiq → nat}/memory/interfaces.py +0 -0
- {aiq → nat}/memory/models.py +0 -0
- {aiq → nat}/object_store/interfaces.py +0 -0
- {aiq → nat}/object_store/models.py +0 -0
- {aiq → nat}/object_store/register.py +0 -0
- {aiq → nat}/observability/__init__.py +0 -0
- {aiq → nat}/observability/exporter/__init__.py +0 -0
- {aiq → nat}/observability/mixin/__init__.py +0 -0
- {aiq → nat}/observability/mixin/batch_config_mixin.py +0 -0
- {aiq → nat}/observability/mixin/collector_config_mixin.py +0 -0
- {aiq → nat}/observability/mixin/file_mode.py +0 -0
- {aiq → nat}/observability/mixin/resource_conflict_mixin.py +0 -0
- {aiq → nat}/observability/mixin/serialize_mixin.py +0 -0
- {aiq → nat}/observability/mixin/type_introspection_mixin.py +0 -0
- {aiq → nat}/observability/processor/__init__.py +0 -0
- {aiq → nat}/observability/utils/__init__.py +0 -0
- {aiq → nat}/observability/utils/dict_utils.py +0 -0
- {aiq → nat}/observability/utils/time_utils.py +0 -0
- {aiq → nat}/plugins/.namespace +0 -0
- {aiq → nat}/profiler/__init__.py +0 -0
- {aiq → nat}/profiler/calc/__init__.py +0 -0
- {aiq → nat}/profiler/calc/data_models.py +0 -0
- {aiq → nat}/profiler/callbacks/__init__.py +0 -0
- {aiq → nat}/profiler/callbacks/base_callback_class.py +0 -0
- {aiq → nat}/profiler/callbacks/token_usage_base_model.py +0 -0
- {aiq → nat}/profiler/data_frame_row.py +0 -0
- {aiq → nat}/profiler/decorators/__init__.py +0 -0
- {aiq → nat}/profiler/forecasting/__init__.py +0 -0
- {aiq → nat}/profiler/forecasting/config.py +0 -0
- {aiq → nat}/profiler/forecasting/models/__init__.py +0 -0
- {aiq → nat}/profiler/forecasting/models/forecasting_base_model.py +0 -0
- {aiq → nat}/profiler/inference_metrics_model.py +0 -0
- {aiq → nat}/profiler/inference_optimization/__init__.py +0 -0
- {aiq → nat}/profiler/inference_optimization/bottleneck_analysis/__init__.py +0 -0
- {aiq → nat}/profiler/inference_optimization/data_models.py +0 -0
- {aiq → nat}/profiler/inference_optimization/experimental/__init__.py +0 -0
- {aiq → nat}/registry_handlers/__init__.py +0 -0
- {aiq → nat}/registry_handlers/local/__init__.py +0 -0
- {aiq → nat}/registry_handlers/pypi/__init__.py +0 -0
- {aiq → nat}/registry_handlers/register.py +0 -0
- {aiq → nat}/registry_handlers/rest/__init__.py +0 -0
- {aiq → nat}/registry_handlers/schemas/__init__.py +0 -0
- {aiq → nat}/registry_handlers/schemas/headers.py +0 -0
- {aiq → nat}/registry_handlers/schemas/status.py +0 -0
- {aiq → nat}/retriever/__init__.py +0 -0
- {aiq → nat}/retriever/milvus/__init__.py +0 -0
- {aiq → nat}/retriever/nemo_retriever/__init__.py +0 -0
- {aiq → nat}/runtime/__init__.py +0 -0
- {aiq → nat}/settings/__init__.py +0 -0
- {aiq → nat}/test/.namespace +0 -0
- {aiq → nat}/tool/__init__.py +0 -0
- {aiq → nat}/tool/code_execution/__init__.py +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/.gitignore +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/Dockerfile.sandbox +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/__init__.py +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/local_sandbox_server.py +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/sandbox.requirements.txt +0 -0
- {aiq → nat}/tool/code_execution/local_sandbox/start_local_sandbox.sh +0 -0
- {aiq → nat}/tool/code_execution/utils.py +0 -0
- {aiq → nat}/tool/github_tools/__init__.py +0 -0
- {aiq → nat}/tool/mcp/__init__.py +0 -0
- {aiq → nat}/tool/memory_tools/__init__.py +0 -0
- {aiq → nat}/tool/register.py +0 -0
- {aiq → nat}/utils/__init__.py +0 -0
- {aiq → nat}/utils/data_models/__init__.py +0 -0
- {aiq → nat}/utils/data_models/schema_validator.py +0 -0
- {aiq → nat}/utils/debugging_utils.py +0 -0
- {aiq → nat}/utils/exception_handlers/__init__.py +0 -0
- {aiq → nat}/utils/exception_handlers/automatic_retries.py +0 -0
- {aiq → nat}/utils/exception_handlers/schemas.py +0 -0
- {aiq → nat}/utils/io/__init__.py +0 -0
- {aiq → nat}/utils/io/model_processing.py +0 -0
- {aiq → nat}/utils/log_utils.py +0 -0
- {aiq → nat}/utils/optional_imports.py +0 -0
- {aiq → nat}/utils/producer_consumer_queue.py +0 -0
- {aiq → nat}/utils/reactive/__init__.py +0 -0
- {aiq → nat}/utils/reactive/base/__init__.py +0 -0
- {aiq → nat}/utils/reactive/base/observer_base.py +0 -0
- {aiq → nat}/utils/settings/__init__.py +0 -0
- {aiq → nat}/utils/string_utils.py +0 -0
- {aiq → nat}/utils/type_utils.py +0 -0
- {aiq → nat}/utils/url_utils.py +0 -0
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc7.dist-info}/WHEEL +0 -0
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc7.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc7.dist-info}/licenses/LICENSE.md +0 -0
nat/meta/pypi.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
# NVIDIA NeMo Agent Toolkit
|
|
21
|
+
|
|
22
|
+
NeMo Agent toolkit is a flexible library designed to seamlessly integrate your enterprise agents—regardless of framework—with various data sources and tools. By treating agents, tools, and agentic workflows as simple function calls, NeMo Agent toolkit enables true composability: build once and reuse anywhere.
|
|
23
|
+
|
|
24
|
+
## Key Features
|
|
25
|
+
|
|
26
|
+
- [**Framework Agnostic:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/extend/plugins.html) Works with any agentic framework, so you can use your current technology stack without replatforming.
|
|
27
|
+
- [**Reusability:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/extend/sharing-components.html) Every agent, tool, or workflow can be combined and repurposed, allowing developers to leverage existing work in new scenarios.
|
|
28
|
+
- [**Rapid Development:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/tutorials/index.html) Start with a pre-built agent, tool, or workflow, and customize it to your needs.
|
|
29
|
+
- [**Profiling:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/workflows/profiler.html) Profile entire workflows down to the tool and agent level, track input/output tokens and timings, and identify bottlenecks.
|
|
30
|
+
- [**Observability:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/workflows/observe/observe-workflow-with-phoenix.html) Monitor and debug your workflows with any OpenTelemetry-compatible observability tool, with examples using [Phoenix](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/workflows/observe/observe-workflow-with-phoenix.html) and [W&B Weave](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/workflows/observe/observe-workflow-with-weave.html).
|
|
31
|
+
- [**Evaluation System:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/workflows/evaluate.html) Validate and maintain accuracy of agentic workflows with built-in evaluation tools.
|
|
32
|
+
- [**User Interface:**](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/quick-start/launching-ui.html) Use the NeMo Agent toolkit UI chat interface to interact with your agents, visualize output, and debug workflows.
|
|
33
|
+
- [**MCP Compatibility**](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/workflows/mcp/mcp-client.html) Compatible with Model Context Protocol (MCP), allowing tools served by MCP Servers to be used as NeMo Agent toolkit functions.
|
|
34
|
+
|
|
35
|
+
With NeMo Agent toolkit, you can move quickly, experiment freely, and ensure reliability across all your agent-driven projects.
|
|
36
|
+
|
|
37
|
+
## Links
|
|
38
|
+
* [Documentation](https://docs.nvidia.com/nemo/agent-toolkit/1.2.0/index.html): Explore the full documentation for NeMo Agent toolkit.
|
|
39
|
+
|
|
40
|
+
## First time user?
|
|
41
|
+
If this is your first time using NeMo Agent toolkit, it is recommended to install the latest version from the [source repository](https://github.com/NVIDIA/NeMo-Agent-Toolkit?tab=readme-ov-file#quick-start) on GitHub. This package is intended for users who are familiar with NeMo Agent toolkit applications and need to add NeMo Agent toolkit as a dependency to their project.
|
|
42
|
+
|
|
43
|
+
## Feedback
|
|
44
|
+
|
|
45
|
+
We would love to hear from you! Please file an issue on [GitHub](https://github.com/NVIDIA/NeMo-Agent-Toolkit/issues) if you have any feedback or feature requests.
|
|
46
|
+
|
|
47
|
+
## Acknowledgements
|
|
48
|
+
|
|
49
|
+
We would like to thank the following open source projects that made NeMo Agent toolkit possible:
|
|
50
|
+
|
|
51
|
+
- [CrewAI](https://github.com/crewAIInc/crewAI)
|
|
52
|
+
- [FastAPI](https://github.com/tiangolo/fastapi)
|
|
53
|
+
- [LangChain](https://github.com/langchain-ai/langchain)
|
|
54
|
+
- [Llama-Index](https://github.com/run-llama/llama_index)
|
|
55
|
+
- [Mem0ai](https://github.com/mem0ai/mem0)
|
|
56
|
+
- [Ragas](https://github.com/explodinggradients/ragas)
|
|
57
|
+
- [Semantic Kernel](https://github.com/microsoft/semantic-kernel)
|
|
58
|
+
- [uv](https://github.com/astral-sh/uv)
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
"""
|
|
16
|
-
|
|
16
|
+
NAT Object Store Module
|
|
17
17
|
|
|
18
18
|
This package provides foundational classes and interfaces
|
|
19
|
-
for managing object storage in
|
|
19
|
+
for managing object storage in NAT's LLM-based agents.
|
|
20
20
|
"""
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
|
|
16
16
|
import asyncio
|
|
17
17
|
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
18
|
+
from nat.builder.builder import Builder
|
|
19
|
+
from nat.cli.register_workflow import register_object_store
|
|
20
|
+
from nat.data_models.object_store import KeyAlreadyExistsError
|
|
21
|
+
from nat.data_models.object_store import NoSuchKeyError
|
|
22
|
+
from nat.data_models.object_store import ObjectStoreBaseConfig
|
|
23
|
+
from nat.utils.type_utils import override
|
|
24
24
|
|
|
25
25
|
from .interfaces import ObjectStore
|
|
26
26
|
from .models import ObjectStoreItem
|
|
@@ -26,11 +26,11 @@ from typing import Generic
|
|
|
26
26
|
from typing import TypeVar
|
|
27
27
|
from typing import overload
|
|
28
28
|
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
32
|
-
from
|
|
33
|
-
from
|
|
29
|
+
from nat.builder.context import ContextState
|
|
30
|
+
from nat.data_models.intermediate_step import IntermediateStep
|
|
31
|
+
from nat.observability.exporter.exporter import Exporter
|
|
32
|
+
from nat.utils.reactive.subject import Subject
|
|
33
|
+
from nat.utils.type_utils import override
|
|
34
34
|
|
|
35
35
|
logger = logging.getLogger(__name__)
|
|
36
36
|
|
|
@@ -117,7 +117,7 @@ class BaseExporter(Exporter):
|
|
|
117
117
|
- This keeps observability "off the hot path" for optimal performance
|
|
118
118
|
|
|
119
119
|
Args:
|
|
120
|
-
context_state (
|
|
120
|
+
context_state (ContextState, optional): The context state to use for the exporter. Defaults to None.
|
|
121
121
|
"""
|
|
122
122
|
|
|
123
123
|
# Class-level tracking for debugging and monitoring
|
|
@@ -130,10 +130,10 @@ class BaseExporter(Exporter):
|
|
|
130
130
|
_ready_event: IsolatedAttribute[asyncio.Event] = IsolatedAttribute(asyncio.Event)
|
|
131
131
|
_shutdown_event: IsolatedAttribute[asyncio.Event] = IsolatedAttribute(asyncio.Event)
|
|
132
132
|
|
|
133
|
-
def __init__(self, context_state:
|
|
133
|
+
def __init__(self, context_state: ContextState | None = None):
|
|
134
134
|
"""Initialize the BaseExporter."""
|
|
135
135
|
if context_state is None:
|
|
136
|
-
context_state =
|
|
136
|
+
context_state = ContextState.get()
|
|
137
137
|
|
|
138
138
|
self._context_state = context_state
|
|
139
139
|
self._subscription = None
|
|
@@ -413,7 +413,7 @@ class BaseExporter(Exporter):
|
|
|
413
413
|
"""
|
|
414
414
|
await self._ready_event.wait()
|
|
415
415
|
|
|
416
|
-
def create_isolated_instance(self, context_state:
|
|
416
|
+
def create_isolated_instance(self, context_state: ContextState) -> "BaseExporter":
|
|
417
417
|
"""Create an isolated copy with automatic descriptor-based state reset.
|
|
418
418
|
|
|
419
419
|
This method creates a shallow copy that shares expensive resources
|
|
@@ -18,7 +18,7 @@ from abc import ABC
|
|
|
18
18
|
from abc import abstractmethod
|
|
19
19
|
from collections.abc import AsyncGenerator
|
|
20
20
|
|
|
21
|
-
from
|
|
21
|
+
from nat.data_models.intermediate_step import IntermediateStep
|
|
22
22
|
|
|
23
23
|
logger = logging.getLogger(__name__)
|
|
24
24
|
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
17
|
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
18
|
+
from nat.builder.context import ContextState
|
|
19
|
+
from nat.data_models.intermediate_step import IntermediateStep
|
|
20
|
+
from nat.observability.exporter.raw_exporter import RawExporter
|
|
21
|
+
from nat.observability.mixin.file_mixin import FileExportMixin
|
|
22
|
+
from nat.observability.processor.intermediate_step_serializer import IntermediateStepSerializer
|
|
23
23
|
|
|
24
24
|
logger = logging.getLogger(__name__)
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ logger = logging.getLogger(__name__)
|
|
|
27
27
|
class FileExporter(FileExportMixin, RawExporter[IntermediateStep, str]): # pylint: disable=R0901
|
|
28
28
|
"""A File exporter that exports telemetry traces to a local file."""
|
|
29
29
|
|
|
30
|
-
def __init__(self, context_state:
|
|
30
|
+
def __init__(self, context_state: ContextState | None = None, **file_kwargs):
|
|
31
31
|
super().__init__(context_state=context_state, **file_kwargs)
|
|
32
32
|
self._processor = IntermediateStepSerializer()
|
|
33
33
|
self.add_processor(self._processor)
|
|
@@ -21,14 +21,14 @@ from typing import Any
|
|
|
21
21
|
from typing import Generic
|
|
22
22
|
from typing import TypeVar
|
|
23
23
|
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
24
|
+
from nat.builder.context import ContextState
|
|
25
|
+
from nat.data_models.intermediate_step import IntermediateStep
|
|
26
|
+
from nat.observability.exporter.base_exporter import BaseExporter
|
|
27
|
+
from nat.observability.mixin.type_introspection_mixin import TypeIntrospectionMixin
|
|
28
|
+
from nat.observability.processor.callback_processor import CallbackProcessor
|
|
29
|
+
from nat.observability.processor.processor import Processor
|
|
30
|
+
from nat.utils.type_utils import DecomposedType
|
|
31
|
+
from nat.utils.type_utils import override
|
|
32
32
|
|
|
33
33
|
PipelineInputT = TypeVar("PipelineInputT")
|
|
34
34
|
PipelineOutputT = TypeVar("PipelineOutputT")
|
|
@@ -53,7 +53,7 @@ class ProcessingExporter(Generic[PipelineInputT, PipelineOutputT], BaseExporter,
|
|
|
53
53
|
- Automatic type validation before export
|
|
54
54
|
"""
|
|
55
55
|
|
|
56
|
-
def __init__(self, context_state:
|
|
56
|
+
def __init__(self, context_state: ContextState | None = None):
|
|
57
57
|
"""Initialize the processing exporter.
|
|
58
58
|
|
|
59
59
|
Args:
|
|
@@ -17,9 +17,9 @@ import logging
|
|
|
17
17
|
from abc import abstractmethod
|
|
18
18
|
from typing import TypeVar
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
20
|
+
from nat.data_models.intermediate_step import IntermediateStep
|
|
21
|
+
from nat.observability.exporter.processing_exporter import ProcessingExporter
|
|
22
|
+
from nat.utils.type_utils import override
|
|
23
23
|
|
|
24
24
|
logger = logging.getLogger(__name__)
|
|
25
25
|
|
|
@@ -37,7 +37,7 @@ class RawExporter(ProcessingExporter[InputT, OutputT]):
|
|
|
37
37
|
The flow is: IntermediateStep -> [Processing Pipeline] -> OutputT -> Export
|
|
38
38
|
|
|
39
39
|
Args:
|
|
40
|
-
context_state (
|
|
40
|
+
context_state (ContextState, optional): The context state to use for the exporter. Defaults to None.
|
|
41
41
|
"""
|
|
42
42
|
|
|
43
43
|
@abstractmethod
|
|
@@ -14,24 +14,29 @@
|
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
|
+
import os
|
|
17
18
|
import re
|
|
19
|
+
import typing
|
|
18
20
|
from abc import abstractmethod
|
|
19
21
|
from typing import TypeVar
|
|
20
22
|
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
from
|
|
23
|
+
from nat.data_models.intermediate_step import IntermediateStep
|
|
24
|
+
from nat.data_models.intermediate_step import IntermediateStepState
|
|
25
|
+
from nat.data_models.intermediate_step import TraceMetadata
|
|
26
|
+
from nat.data_models.span import MimeTypes
|
|
27
|
+
from nat.data_models.span import Span
|
|
28
|
+
from nat.data_models.span import SpanAttributes
|
|
29
|
+
from nat.data_models.span import SpanContext
|
|
30
|
+
from nat.data_models.span import event_type_to_span_kind
|
|
31
|
+
from nat.observability.exporter.base_exporter import IsolatedAttribute
|
|
32
|
+
from nat.observability.exporter.processing_exporter import ProcessingExporter
|
|
33
|
+
from nat.observability.mixin.serialize_mixin import SerializeMixin
|
|
34
|
+
from nat.observability.utils.dict_utils import merge_dicts
|
|
35
|
+
from nat.observability.utils.time_utils import ns_timestamp
|
|
36
|
+
from nat.utils.type_utils import override
|
|
37
|
+
|
|
38
|
+
if typing.TYPE_CHECKING:
|
|
39
|
+
from nat.builder.context import ContextState
|
|
35
40
|
|
|
36
41
|
logger = logging.getLogger(__name__)
|
|
37
42
|
|
|
@@ -67,8 +72,13 @@ class SpanExporter(ProcessingExporter[InputSpanT, OutputSpanT], SerializeMixin):
|
|
|
67
72
|
1. IntermediateStep (START) → Create Span → Add to tracking
|
|
68
73
|
2. IntermediateStep (END) → Complete Span → Process through pipeline → Export
|
|
69
74
|
|
|
70
|
-
|
|
71
|
-
|
|
75
|
+
Parameters
|
|
76
|
+
----------
|
|
77
|
+
context_state: `ContextState`, optional
|
|
78
|
+
The context state to use for the exporter. Defaults to None.
|
|
79
|
+
span_prefix: `str`, optional
|
|
80
|
+
The prefix name to use for span attributes. If `None` the value of the `NAT_SPAN_PREFIX` environment
|
|
81
|
+
variable is used. Defaults to `"nat"` if neither are defined.
|
|
72
82
|
"""
|
|
73
83
|
|
|
74
84
|
# Use descriptors for automatic isolation of span-specific state
|
|
@@ -76,6 +86,13 @@ class SpanExporter(ProcessingExporter[InputSpanT, OutputSpanT], SerializeMixin):
|
|
|
76
86
|
_span_stack: IsolatedAttribute[dict] = IsolatedAttribute(dict)
|
|
77
87
|
_metadata_stack: IsolatedAttribute[dict] = IsolatedAttribute(dict)
|
|
78
88
|
|
|
89
|
+
def __init__(self, context_state: "ContextState | None" = None, span_prefix: str | None = None):
|
|
90
|
+
super().__init__(context_state=context_state)
|
|
91
|
+
if span_prefix is None:
|
|
92
|
+
span_prefix = os.getenv("NAT_SPAN_PREFIX", "nat").strip() or "nat"
|
|
93
|
+
|
|
94
|
+
self._span_prefix = span_prefix
|
|
95
|
+
|
|
79
96
|
@abstractmethod
|
|
80
97
|
async def export_processed(self, item: OutputSpanT) -> None:
|
|
81
98
|
"""Export the processed span.
|
|
@@ -137,22 +154,27 @@ class SpanExporter(ProcessingExporter[InputSpanT, OutputSpanT], SerializeMixin):
|
|
|
137
154
|
else:
|
|
138
155
|
sub_span_name = f"{event.payload.event_type}"
|
|
139
156
|
|
|
140
|
-
sub_span = Span(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
157
|
+
sub_span = Span(name=sub_span_name,
|
|
158
|
+
parent=parent_span,
|
|
159
|
+
context=span_ctx,
|
|
160
|
+
attributes={
|
|
161
|
+
f"{self._span_prefix}.event_type":
|
|
162
|
+
event.payload.event_type.value,
|
|
163
|
+
f"{self._span_prefix}.function.id":
|
|
164
|
+
event.function_ancestry.function_id if event.function_ancestry else "unknown",
|
|
165
|
+
f"{self._span_prefix}.function.name":
|
|
166
|
+
event.function_ancestry.function_name if event.function_ancestry else "unknown",
|
|
167
|
+
f"{self._span_prefix}.subspan.name":
|
|
168
|
+
event.payload.name or "",
|
|
169
|
+
f"{self._span_prefix}.event_timestamp":
|
|
170
|
+
event.event_timestamp,
|
|
171
|
+
f"{self._span_prefix}.framework":
|
|
172
|
+
event.payload.framework.value if event.payload.framework else "unknown",
|
|
173
|
+
},
|
|
174
|
+
start_time=start_ns)
|
|
153
175
|
|
|
154
176
|
span_kind = event_type_to_span_kind(event.event_type)
|
|
155
|
-
sub_span.set_attribute("
|
|
177
|
+
sub_span.set_attribute(f"{self._span_prefix}.span.kind", span_kind.value)
|
|
156
178
|
|
|
157
179
|
if event.payload.data and event.payload.data.input:
|
|
158
180
|
match = re.search(r"Human:\s*Question:\s*(.*)", str(event.payload.data.input))
|
|
@@ -204,9 +226,9 @@ class SpanExporter(ProcessingExporter[InputSpanT, OutputSpanT], SerializeMixin):
|
|
|
204
226
|
# Optionally add more attributes from usage_info or data
|
|
205
227
|
usage_info = event.payload.usage_info
|
|
206
228
|
if usage_info:
|
|
207
|
-
sub_span.set_attribute(SpanAttributes.
|
|
229
|
+
sub_span.set_attribute(SpanAttributes.NAT_USAGE_NUM_LLM_CALLS.value,
|
|
208
230
|
usage_info.num_llm_calls if usage_info.num_llm_calls else 0)
|
|
209
|
-
sub_span.set_attribute(SpanAttributes.
|
|
231
|
+
sub_span.set_attribute(SpanAttributes.NAT_USAGE_SECONDS_BETWEEN_CALLS.value,
|
|
210
232
|
usage_info.seconds_between_calls if usage_info.seconds_between_calls else 0)
|
|
211
233
|
sub_span.set_attribute(SpanAttributes.LLM_TOKEN_COUNT_PROMPT.value,
|
|
212
234
|
usage_info.token_usage.prompt_tokens if usage_info.token_usage else 0)
|
|
@@ -239,8 +261,9 @@ class SpanExporter(ProcessingExporter[InputSpanT, OutputSpanT], SerializeMixin):
|
|
|
239
261
|
|
|
240
262
|
merged_metadata = merge_dicts(start_metadata, end_metadata)
|
|
241
263
|
serialized_metadata, is_json = self._serialize_payload(merged_metadata)
|
|
242
|
-
sub_span.set_attribute("
|
|
243
|
-
sub_span.set_attribute("
|
|
264
|
+
sub_span.set_attribute(f"{self._span_prefix}.metadata", serialized_metadata)
|
|
265
|
+
sub_span.set_attribute(f"{self._span_prefix}.metadata.mime_type",
|
|
266
|
+
MimeTypes.JSON.value if is_json else MimeTypes.TEXT.value)
|
|
244
267
|
|
|
245
268
|
end_ns = ns_timestamp(event.payload.event_timestamp)
|
|
246
269
|
|
|
@@ -17,8 +17,8 @@ import asyncio
|
|
|
17
17
|
import logging
|
|
18
18
|
from contextlib import asynccontextmanager
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
20
|
+
from nat.builder.context import ContextState
|
|
21
|
+
from nat.observability.exporter.base_exporter import BaseExporter
|
|
22
22
|
|
|
23
23
|
logger = logging.getLogger(__name__)
|
|
24
24
|
|
|
@@ -133,7 +133,7 @@ class ExporterManager:
|
|
|
133
133
|
"""
|
|
134
134
|
return self._exporter_registry
|
|
135
135
|
|
|
136
|
-
def create_isolated_exporters(self, context_state:
|
|
136
|
+
def create_isolated_exporters(self, context_state: ContextState | None = None) -> dict[str, BaseExporter]:
|
|
137
137
|
"""
|
|
138
138
|
Create isolated copies of all exporters for concurrent execution.
|
|
139
139
|
|
|
@@ -141,7 +141,7 @@ class ExporterManager:
|
|
|
141
141
|
expensive resources but have separate mutable state.
|
|
142
142
|
|
|
143
143
|
Args:
|
|
144
|
-
context_state (
|
|
144
|
+
context_state (ContextState | None, optional): The isolated context state for the new exporter instances.
|
|
145
145
|
If not provided, a new context state will be created.
|
|
146
146
|
|
|
147
147
|
Returns:
|
|
@@ -149,7 +149,7 @@ class ExporterManager:
|
|
|
149
149
|
"""
|
|
150
150
|
# Provide default context state if None
|
|
151
151
|
if context_state is None:
|
|
152
|
-
context_state =
|
|
152
|
+
context_state = ContextState.get()
|
|
153
153
|
|
|
154
154
|
isolated_exporters = {}
|
|
155
155
|
for name, exporter in self._exporter_registry.items():
|
|
@@ -198,7 +198,7 @@ class ExporterManager:
|
|
|
198
198
|
logger.error("Error stopping isolated exporter '%s': %s", name, e)
|
|
199
199
|
|
|
200
200
|
@asynccontextmanager
|
|
201
|
-
async def start(self, context_state:
|
|
201
|
+
async def start(self, context_state: ContextState | None = None):
|
|
202
202
|
"""
|
|
203
203
|
Start all registered exporters concurrently.
|
|
204
204
|
|
|
@@ -19,8 +19,8 @@ from datetime import datetime
|
|
|
19
19
|
from pathlib import Path
|
|
20
20
|
from typing import Any
|
|
21
21
|
|
|
22
|
-
from
|
|
23
|
-
from
|
|
22
|
+
from nat.observability.mixin.file_mode import FileMode
|
|
23
|
+
from nat.observability.mixin.resource_conflict_mixin import ResourceConflictMixin
|
|
24
24
|
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
26
26
|
|
|
@@ -23,7 +23,7 @@ from typing import Any
|
|
|
23
23
|
from typing import Generic
|
|
24
24
|
from typing import TypeVar
|
|
25
25
|
|
|
26
|
-
from
|
|
26
|
+
from nat.observability.processor.callback_processor import CallbackProcessor
|
|
27
27
|
|
|
28
28
|
logger = logging.getLogger(__name__)
|
|
29
29
|
|
|
@@ -19,7 +19,7 @@ from collections.abc import Callable
|
|
|
19
19
|
from typing import Any
|
|
20
20
|
from typing import TypeVar
|
|
21
21
|
|
|
22
|
-
from
|
|
22
|
+
from nat.observability.processor.processor import Processor
|
|
23
23
|
|
|
24
24
|
InputT = TypeVar('InputT')
|
|
25
25
|
OutputT = TypeVar('OutputT')
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
16
|
+
from nat.data_models.intermediate_step import IntermediateStep
|
|
17
|
+
from nat.observability.mixin.serialize_mixin import SerializeMixin
|
|
18
|
+
from nat.observability.processor.processor import Processor
|
|
19
|
+
from nat.utils.type_utils import override
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class IntermediateStepSerializer(SerializeMixin, Processor[IntermediateStep, str]):
|
|
@@ -18,7 +18,7 @@ from abc import abstractmethod
|
|
|
18
18
|
from typing import Generic
|
|
19
19
|
from typing import TypeVar
|
|
20
20
|
|
|
21
|
-
from
|
|
21
|
+
from nat.observability.mixin.type_introspection_mixin import TypeIntrospectionMixin
|
|
22
22
|
|
|
23
23
|
InputT = TypeVar('InputT')
|
|
24
24
|
OutputT = TypeVar('OutputT')
|
|
@@ -17,12 +17,12 @@ import logging
|
|
|
17
17
|
|
|
18
18
|
from pydantic import Field
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
20
|
+
from nat.builder.builder import Builder
|
|
21
|
+
from nat.cli.register_workflow import register_logging_method
|
|
22
|
+
from nat.cli.register_workflow import register_telemetry_exporter
|
|
23
|
+
from nat.data_models.logging import LoggingBaseConfig
|
|
24
|
+
from nat.data_models.telemetry_exporter import TelemetryExporterBaseConfig
|
|
25
|
+
from nat.observability.mixin.file_mode import FileMode
|
|
26
26
|
|
|
27
27
|
logger = logging.getLogger(__name__)
|
|
28
28
|
|
|
@@ -50,7 +50,7 @@ async def file_telemetry_exporter(config: FileTelemetryExporterConfig, builder:
|
|
|
50
50
|
Build and return a FileExporter for file-based telemetry export with optional rolling.
|
|
51
51
|
"""
|
|
52
52
|
|
|
53
|
-
from
|
|
53
|
+
from nat.observability.exporter.file_exporter import FileExporter
|
|
54
54
|
|
|
55
55
|
yield FileExporter(output_path=config.output_path,
|
|
56
56
|
project=config.project,
|
|
@@ -22,23 +22,23 @@ from pathlib import Path
|
|
|
22
22
|
|
|
23
23
|
from pydantic import ValidationError
|
|
24
24
|
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
from
|
|
35
|
-
from
|
|
36
|
-
from
|
|
37
|
-
from
|
|
38
|
-
from
|
|
39
|
-
from
|
|
40
|
-
from
|
|
41
|
-
from
|
|
25
|
+
from nat.eval.config import EvaluationRunConfig
|
|
26
|
+
from nat.eval.runners.config import MultiEvaluationRunConfig
|
|
27
|
+
from nat.eval.runners.multi_eval_runner import MultiEvaluationRunner
|
|
28
|
+
from nat.profiler.calc.calculations import LinearFitResult
|
|
29
|
+
from nat.profiler.calc.calculations import calc_gpu_estimate_based_on_slope
|
|
30
|
+
from nat.profiler.calc.calculations import calc_gpu_estimate_for_single_concurrency
|
|
31
|
+
from nat.profiler.calc.calculations import compute_slope
|
|
32
|
+
from nat.profiler.calc.data_models import CalcAlerts
|
|
33
|
+
from nat.profiler.calc.data_models import CalcData
|
|
34
|
+
from nat.profiler.calc.data_models import CalcRunnerConfig
|
|
35
|
+
from nat.profiler.calc.data_models import CalcRunnerOutput
|
|
36
|
+
from nat.profiler.calc.data_models import FitConfig
|
|
37
|
+
from nat.profiler.calc.data_models import FitResults
|
|
38
|
+
from nat.profiler.calc.data_models import GPUEstimates
|
|
39
|
+
from nat.profiler.calc.data_models import SizingMetricPerItem
|
|
40
|
+
from nat.profiler.calc.data_models import SizingMetrics
|
|
41
|
+
from nat.profiler.calc.data_models import SizingMetricsAlerts
|
|
42
42
|
|
|
43
43
|
logger = logging.getLogger(__name__)
|
|
44
44
|
|
|
@@ -416,7 +416,7 @@ class CalcRunner:
|
|
|
416
416
|
|
|
417
417
|
def plot_concurrency_vs_time_metrics(self, output_dir: Path):
|
|
418
418
|
"""Plots concurrency vs. time metrics using pre-computed fits."""
|
|
419
|
-
from
|
|
419
|
+
from nat.profiler.calc.plot import plot_concurrency_vs_time_metrics as plot_metrics
|
|
420
420
|
|
|
421
421
|
# Only plot if we have valid metrics and at least one fit
|
|
422
422
|
if not self.metrics_per_concurrency:
|
|
@@ -17,9 +17,9 @@ import logging
|
|
|
17
17
|
|
|
18
18
|
import numpy as np
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
20
|
+
from nat.profiler.calc.data_models import FitConfig
|
|
21
|
+
from nat.profiler.calc.data_models import GPUEstimates
|
|
22
|
+
from nat.profiler.calc.data_models import LinearFitResult
|
|
23
23
|
|
|
24
24
|
logger = logging.getLogger(__name__)
|
|
25
25
|
|
|
@@ -20,8 +20,8 @@ import matplotlib.pyplot as plt
|
|
|
20
20
|
import numpy as np
|
|
21
21
|
import pandas as pd
|
|
22
22
|
|
|
23
|
-
from
|
|
24
|
-
from
|
|
23
|
+
from nat.profiler.calc.data_models import LinearFitResult
|
|
24
|
+
from nat.profiler.calc.data_models import SizingMetrics
|
|
25
25
|
|
|
26
26
|
logger = logging.getLogger(__name__)
|
|
27
27
|
|