nvidia-nat 1.2.0rc5__py3-none-any.whl → 1.2.0rc6__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.0rc6.dist-info}/METADATA +37 -37
- nvidia_nat-1.2.0rc6.dist-info/RECORD +434 -0
- nvidia_nat-1.2.0rc6.dist-info/entry_points.txt +21 -0
- nvidia_nat-1.2.0rc6.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.0rc6.dist-info}/WHEEL +0 -0
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc6.dist-info}/licenses/LICENSE-3rd-party.txt +0 -0
- {nvidia_nat-1.2.0rc5.dist-info → nvidia_nat-1.2.0rc6.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -19,24 +19,24 @@ from contextlib import AsyncExitStack
|
|
|
19
19
|
|
|
20
20
|
import click
|
|
21
21
|
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
22
|
+
from nat.data_models.component import ComponentEnum
|
|
23
|
+
from nat.data_models.registry_handler import RegistryHandlerBaseConfig
|
|
24
|
+
from nat.registry_handlers.schemas.search import SearchFields
|
|
25
25
|
|
|
26
26
|
logger = logging.getLogger(__name__)
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
async def search_artifacts( # pylint: disable=R0917
|
|
30
30
|
registry_handler_config: RegistryHandlerBaseConfig,
|
|
31
|
-
component_types: list[
|
|
31
|
+
component_types: list[ComponentEnum],
|
|
32
32
|
visualize: bool,
|
|
33
33
|
query: str,
|
|
34
34
|
num_results: int,
|
|
35
35
|
query_fields: list[SearchFields],
|
|
36
36
|
save_path: str | None) -> None:
|
|
37
37
|
|
|
38
|
-
from
|
|
39
|
-
from
|
|
38
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
39
|
+
from nat.registry_handlers.schemas.search import SearchQuery
|
|
40
40
|
|
|
41
41
|
registry = GlobalTypeRegistry.get()
|
|
42
42
|
|
|
@@ -46,7 +46,7 @@ async def search_artifacts( # pylint: disable=R0917
|
|
|
46
46
|
registry_handler = await stack.enter_async_context(registry_handler_info.build_fn(registry_handler_config))
|
|
47
47
|
|
|
48
48
|
if (len(component_types) == 0):
|
|
49
|
-
component_types = [t.value for t in
|
|
49
|
+
component_types = [t.value for t in ComponentEnum]
|
|
50
50
|
|
|
51
51
|
if (len(query_fields) == 0):
|
|
52
52
|
query_fields = (SearchFields.ALL, )
|
|
@@ -60,15 +60,15 @@ async def search_artifacts( # pylint: disable=R0917
|
|
|
60
60
|
registry_handler.save_search_results(search_response=search_response, save_path=save_path)
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
@click.group(name=__name__, invoke_without_command=True, help="List the locally registered
|
|
63
|
+
@click.group(name=__name__, invoke_without_command=True, help="List the locally registered NAT components.")
|
|
64
64
|
@click.option(
|
|
65
65
|
"-t",
|
|
66
66
|
"--types",
|
|
67
67
|
"component_types",
|
|
68
68
|
multiple=True,
|
|
69
|
-
type=click.Choice([e.value for e in
|
|
69
|
+
type=click.Choice([e.value for e in ComponentEnum], case_sensitive=False),
|
|
70
70
|
required=False,
|
|
71
|
-
help=("Filter the search by
|
|
71
|
+
help=("Filter the search by NAT component type."),
|
|
72
72
|
)
|
|
73
73
|
@click.option(
|
|
74
74
|
"-o",
|
|
@@ -104,12 +104,12 @@ async def search_artifacts( # pylint: disable=R0917
|
|
|
104
104
|
def list_components(fields: list[SearchFields],
|
|
105
105
|
query: str,
|
|
106
106
|
num_results: int,
|
|
107
|
-
component_types: list[
|
|
107
|
+
component_types: list[ComponentEnum],
|
|
108
108
|
output_path: str | None = None) -> None:
|
|
109
109
|
|
|
110
|
-
from
|
|
111
|
-
from
|
|
112
|
-
from
|
|
110
|
+
from nat.runtime.loader import PluginTypes
|
|
111
|
+
from nat.runtime.loader import discover_and_register_plugins
|
|
112
|
+
from nat.settings.global_settings import GlobalSettings
|
|
113
113
|
|
|
114
114
|
discover_and_register_plugins(PluginTypes.ALL)
|
|
115
115
|
|
|
@@ -13,16 +13,18 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
+
import asyncio
|
|
16
17
|
import json
|
|
17
18
|
import logging
|
|
19
|
+
import time
|
|
18
20
|
from typing import Any
|
|
19
21
|
|
|
20
|
-
import anyio
|
|
21
22
|
import click
|
|
23
|
+
from pydantic import BaseModel
|
|
22
24
|
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
25
|
+
from nat.tool.mcp.exceptions import MCPError
|
|
26
|
+
from nat.tool.mcp.mcp_client import MCPBuilder
|
|
27
|
+
from nat.utils.exception_handlers.mcp import format_mcp_error
|
|
26
28
|
|
|
27
29
|
# Suppress verbose logs from mcp.client.sse and httpx
|
|
28
30
|
logging.getLogger("mcp.client.sse").setLevel(logging.WARNING)
|
|
@@ -31,6 +33,21 @@ logging.getLogger("httpx").setLevel(logging.WARNING)
|
|
|
31
33
|
logger = logging.getLogger(__name__)
|
|
32
34
|
|
|
33
35
|
|
|
36
|
+
class MCPPingResult(BaseModel):
|
|
37
|
+
"""Result of an MCP server ping request.
|
|
38
|
+
|
|
39
|
+
Attributes:
|
|
40
|
+
url (str): The MCP server URL that was pinged
|
|
41
|
+
status (str): Health status - 'healthy', 'unhealthy', or 'unknown'
|
|
42
|
+
response_time_ms (float | None): Response time in milliseconds, None if request failed completely
|
|
43
|
+
error (str | None): Error message if the ping failed, None if successful
|
|
44
|
+
"""
|
|
45
|
+
url: str
|
|
46
|
+
status: str
|
|
47
|
+
response_time_ms: float | None
|
|
48
|
+
error: str | None
|
|
49
|
+
|
|
50
|
+
|
|
34
51
|
def format_tool(tool: Any) -> dict[str, str | None]:
|
|
35
52
|
"""Format an MCP tool into a dictionary for display.
|
|
36
53
|
|
|
@@ -103,9 +120,8 @@ async def list_tools_and_schemas(url: str, tool_name: str | None = None) -> list
|
|
|
103
120
|
if tool_name:
|
|
104
121
|
tool = await builder.get_tool(tool_name)
|
|
105
122
|
return [format_tool(tool)]
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
return [format_tool(tool) for tool in tools.values()]
|
|
123
|
+
tools = await builder.get_tools()
|
|
124
|
+
return [format_tool(tool) for tool in tools.values()]
|
|
109
125
|
except MCPError as e:
|
|
110
126
|
format_mcp_error(e, include_traceback=False)
|
|
111
127
|
return []
|
|
@@ -152,8 +168,8 @@ async def list_tools_direct(url: str, tool_name: str | None = None) -> list[dict
|
|
|
152
168
|
return tools
|
|
153
169
|
except Exception as e:
|
|
154
170
|
# Convert raw exceptions to structured MCPError for consistency
|
|
155
|
-
from
|
|
156
|
-
from
|
|
171
|
+
from nat.utils.exception_handlers.mcp import convert_to_mcp_error
|
|
172
|
+
from nat.utils.exception_handlers.mcp import extract_primary_exception
|
|
157
173
|
|
|
158
174
|
if isinstance(e, ExceptionGroup): # noqa: F821
|
|
159
175
|
primary_exception = extract_primary_exception(list(e.exceptions))
|
|
@@ -165,6 +181,49 @@ async def list_tools_direct(url: str, tool_name: str | None = None) -> list[dict
|
|
|
165
181
|
return []
|
|
166
182
|
|
|
167
183
|
|
|
184
|
+
async def ping_mcp_server(url: str, timeout: int) -> MCPPingResult:
|
|
185
|
+
"""Ping an MCP server to check if it's responsive.
|
|
186
|
+
|
|
187
|
+
Args:
|
|
188
|
+
url (str): MCP server URL to ping
|
|
189
|
+
timeout (int): Timeout in seconds for the ping request
|
|
190
|
+
|
|
191
|
+
Returns:
|
|
192
|
+
MCPPingResult: Structured result with status, response_time, and any error info
|
|
193
|
+
"""
|
|
194
|
+
from mcp.client.session import ClientSession
|
|
195
|
+
from mcp.client.sse import sse_client
|
|
196
|
+
|
|
197
|
+
async def _ping_operation():
|
|
198
|
+
async with sse_client(url) as (read, write):
|
|
199
|
+
async with ClientSession(read, write) as session:
|
|
200
|
+
# Initialize the session
|
|
201
|
+
await session.initialize()
|
|
202
|
+
|
|
203
|
+
# Record start time just before ping
|
|
204
|
+
start_time = time.time()
|
|
205
|
+
# Send ping request
|
|
206
|
+
await session.send_ping()
|
|
207
|
+
|
|
208
|
+
end_time = time.time()
|
|
209
|
+
response_time_ms = round((end_time - start_time) * 1000, 2)
|
|
210
|
+
|
|
211
|
+
return MCPPingResult(url=url, status="healthy", response_time_ms=response_time_ms, error=None)
|
|
212
|
+
|
|
213
|
+
try:
|
|
214
|
+
# Apply timeout to the entire ping operation
|
|
215
|
+
return await asyncio.wait_for(_ping_operation(), timeout=timeout)
|
|
216
|
+
|
|
217
|
+
except asyncio.TimeoutError:
|
|
218
|
+
return MCPPingResult(url=url,
|
|
219
|
+
status="unreachable",
|
|
220
|
+
response_time_ms=None,
|
|
221
|
+
error=f"Timeout after {timeout} seconds")
|
|
222
|
+
|
|
223
|
+
except Exception as e:
|
|
224
|
+
return MCPPingResult(url=url, status="unhealthy", response_time_ms=None, error=str(e))
|
|
225
|
+
|
|
226
|
+
|
|
168
227
|
@click.group(invoke_without_command=True, help="List tool names (default), or show details with --detail or --tool.")
|
|
169
228
|
@click.option('--direct', is_flag=True, help='Bypass MCPBuilder and use direct MCP protocol')
|
|
170
229
|
@click.option('--url', default='http://localhost:9901/sse', show_default=True, help='MCP server URL')
|
|
@@ -189,16 +248,16 @@ def list_mcp(ctx: click.Context, direct: bool, url: str, tool: str | None, detai
|
|
|
189
248
|
json_output (bool): Whether to output tool metadata in JSON format instead of text
|
|
190
249
|
|
|
191
250
|
Examples:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
251
|
+
nat info mcp # List tool names only
|
|
252
|
+
nat info mcp --detail # Show all tools with full details
|
|
253
|
+
nat info mcp --tool my_tool # Show details for specific tool
|
|
254
|
+
nat info mcp --json-output # Get JSON format output
|
|
255
|
+
nat info mcp --direct --url http://... # Use direct protocol with custom URL
|
|
197
256
|
"""
|
|
198
257
|
if ctx.invoked_subcommand is not None:
|
|
199
258
|
return
|
|
200
259
|
fetcher = list_tools_direct if direct else list_tools_and_schemas
|
|
201
|
-
tools =
|
|
260
|
+
tools = asyncio.run(fetcher(url, tool))
|
|
202
261
|
|
|
203
262
|
if json_output:
|
|
204
263
|
click.echo(json.dumps(tools, indent=2))
|
|
@@ -211,3 +270,35 @@ def list_mcp(ctx: click.Context, direct: bool, url: str, tool: str | None, detai
|
|
|
211
270
|
else:
|
|
212
271
|
for tool_dict in tools:
|
|
213
272
|
click.echo(tool_dict.get('name', 'Unknown tool'))
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
@list_mcp.command()
|
|
276
|
+
@click.option('--url', default='http://localhost:9901/sse', show_default=True, help='MCP server URL')
|
|
277
|
+
@click.option('--timeout', default=60, show_default=True, help='Timeout in seconds for ping request')
|
|
278
|
+
@click.option('--json-output', is_flag=True, help='Output ping result in JSON format')
|
|
279
|
+
def ping(url: str, timeout: int, json_output: bool) -> None:
|
|
280
|
+
"""Ping an MCP server to check if it's responsive.
|
|
281
|
+
|
|
282
|
+
This command sends a ping request to the MCP server and measures the response time.
|
|
283
|
+
It's useful for health checks and monitoring server availability.
|
|
284
|
+
|
|
285
|
+
Args:
|
|
286
|
+
url (str): MCP server URL to ping (default: http://localhost:9901/sse)
|
|
287
|
+
timeout (int): Timeout in seconds for the ping request (default: 60)
|
|
288
|
+
json_output (bool): Whether to output the result in JSON format
|
|
289
|
+
|
|
290
|
+
Examples:
|
|
291
|
+
nat info mcp ping # Ping default server
|
|
292
|
+
nat info mcp ping --url http://custom-server:9901/sse # Ping custom server
|
|
293
|
+
nat info mcp ping --timeout 10 # Use 10 second timeout
|
|
294
|
+
nat info mcp ping --json-output # Get JSON format output
|
|
295
|
+
"""
|
|
296
|
+
result = asyncio.run(ping_mcp_server(url, timeout))
|
|
297
|
+
|
|
298
|
+
if json_output:
|
|
299
|
+
click.echo(result.model_dump_json(indent=2))
|
|
300
|
+
else:
|
|
301
|
+
if result.status == "healthy":
|
|
302
|
+
click.echo(f"Server at {result.url} is healthy (response time: {result.response_time_ms}ms)")
|
|
303
|
+
else:
|
|
304
|
+
click.echo(f"Server at {result.url} {result.status}: {result.error}")
|
|
@@ -20,16 +20,16 @@ from pathlib import Path
|
|
|
20
20
|
|
|
21
21
|
import click
|
|
22
22
|
|
|
23
|
-
from
|
|
24
|
-
from
|
|
23
|
+
from nat.data_models.registry_handler import RegistryHandlerBaseConfig
|
|
24
|
+
from nat.utils.data_models.schema_validator import validate_yaml
|
|
25
25
|
|
|
26
26
|
logger = logging.getLogger(__name__)
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
async def publish_artifact(registry_handler_config: RegistryHandlerBaseConfig, package_root: str) -> None:
|
|
30
30
|
|
|
31
|
-
from
|
|
32
|
-
from
|
|
31
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
32
|
+
from nat.registry_handlers.package_utils import build_artifact
|
|
33
33
|
|
|
34
34
|
registry = GlobalTypeRegistry.get()
|
|
35
35
|
|
|
@@ -38,7 +38,7 @@ async def publish_artifact(registry_handler_config: RegistryHandlerBaseConfig, p
|
|
|
38
38
|
registry_handler_info = registry.get_registry_handler(type(registry_handler_config))
|
|
39
39
|
registry_handler = await stack.enter_async_context(registry_handler_info.build_fn(registry_handler_config))
|
|
40
40
|
try:
|
|
41
|
-
artifact =
|
|
41
|
+
artifact = build_artifact(package_root=package_root)
|
|
42
42
|
except Exception as e:
|
|
43
43
|
logger.exception("Error building artifact: %s", e, exc_info=True)
|
|
44
44
|
return
|
|
@@ -47,7 +47,7 @@ async def publish_artifact(registry_handler_config: RegistryHandlerBaseConfig, p
|
|
|
47
47
|
|
|
48
48
|
@click.group(name=__name__,
|
|
49
49
|
invoke_without_command=True,
|
|
50
|
-
help=("Publish local
|
|
50
|
+
help=("Publish local NAT artifacts to a remote "
|
|
51
51
|
"registry from package repository."))
|
|
52
52
|
@click.option(
|
|
53
53
|
"--config_file",
|
|
@@ -61,14 +61,14 @@ async def publish_artifact(registry_handler_config: RegistryHandlerBaseConfig, p
|
|
|
61
61
|
"--channel",
|
|
62
62
|
type=str,
|
|
63
63
|
required=True,
|
|
64
|
-
help=("The remote registry channel to use when publishing the
|
|
64
|
+
help=("The remote registry channel to use when publishing the NAT artifact."),
|
|
65
65
|
)
|
|
66
66
|
@click.argument("package_root", type=str)
|
|
67
67
|
def publish(channel: str, config_file: str, package_root: str) -> None:
|
|
68
68
|
"""
|
|
69
|
-
Publish
|
|
69
|
+
Publish NAT artifacts with the specified configuration
|
|
70
70
|
"""
|
|
71
|
-
from
|
|
71
|
+
from nat.settings.global_settings import GlobalSettings
|
|
72
72
|
|
|
73
73
|
settings = GlobalSettings().get()
|
|
74
74
|
|
|
@@ -20,18 +20,18 @@ from pathlib import Path
|
|
|
20
20
|
|
|
21
21
|
import click
|
|
22
22
|
|
|
23
|
-
from
|
|
24
|
-
from
|
|
23
|
+
from nat.data_models.registry_handler import RegistryHandlerBaseConfig
|
|
24
|
+
from nat.utils.data_models.schema_validator import validate_yaml
|
|
25
25
|
|
|
26
26
|
logger = logging.getLogger(__name__)
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
async def pull_artifact(registry_handler_config: RegistryHandlerBaseConfig, packages: list[str]) -> None:
|
|
30
30
|
|
|
31
|
-
from
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
from
|
|
31
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
32
|
+
from nat.registry_handlers.schemas.package import PackageNameVersion
|
|
33
|
+
from nat.registry_handlers.schemas.pull import PullPackageWhl
|
|
34
|
+
from nat.registry_handlers.schemas.pull import PullRequestPackages
|
|
35
35
|
|
|
36
36
|
registry = GlobalTypeRegistry.get()
|
|
37
37
|
|
|
@@ -74,7 +74,7 @@ async def pull_artifact(registry_handler_config: RegistryHandlerBaseConfig, pack
|
|
|
74
74
|
|
|
75
75
|
@click.group(name=__name__,
|
|
76
76
|
invoke_without_command=True,
|
|
77
|
-
help=("Pull
|
|
77
|
+
help=("Pull NAT artifacts from a remote registry "
|
|
78
78
|
"by package name."))
|
|
79
79
|
@click.option(
|
|
80
80
|
"--config_file",
|
|
@@ -88,15 +88,15 @@ async def pull_artifact(registry_handler_config: RegistryHandlerBaseConfig, pack
|
|
|
88
88
|
"--channel",
|
|
89
89
|
type=str,
|
|
90
90
|
required=True,
|
|
91
|
-
help=("The remote registry channel to use when pulling the
|
|
91
|
+
help=("The remote registry channel to use when pulling the NAT artifact."),
|
|
92
92
|
)
|
|
93
93
|
@click.argument("packages", type=str)
|
|
94
94
|
def pull(channel: str, config_file: str, packages: str) -> None:
|
|
95
95
|
"""
|
|
96
|
-
Pull
|
|
96
|
+
Pull NAT artifacts from a remote registry channel.
|
|
97
97
|
"""
|
|
98
98
|
|
|
99
|
-
from
|
|
99
|
+
from nat.settings.global_settings import GlobalSettings
|
|
100
100
|
|
|
101
101
|
packages = packages.split()
|
|
102
102
|
|
|
@@ -17,17 +17,15 @@ import logging
|
|
|
17
17
|
|
|
18
18
|
import click
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
20
|
+
from nat.cli.commands.registry.publish import publish
|
|
21
|
+
from nat.cli.commands.registry.pull import pull
|
|
22
|
+
from nat.cli.commands.registry.remove import remove
|
|
23
|
+
from nat.cli.commands.registry.search import search
|
|
24
24
|
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
@click.group(name=__name__,
|
|
29
|
-
invoke_without_command=False,
|
|
30
|
-
help="Utility to configure AIQ Toolkit remote registry channels.")
|
|
28
|
+
@click.group(name=__name__, invoke_without_command=False, help="Utility to configure NAT remote registry channels.")
|
|
31
29
|
def registry_command(**kwargs):
|
|
32
30
|
pass
|
|
33
31
|
|
|
@@ -20,16 +20,16 @@ from pathlib import Path
|
|
|
20
20
|
|
|
21
21
|
import click
|
|
22
22
|
|
|
23
|
-
from
|
|
24
|
-
from
|
|
23
|
+
from nat.data_models.registry_handler import RegistryHandlerBaseConfig
|
|
24
|
+
from nat.utils.data_models.schema_validator import validate_yaml
|
|
25
25
|
|
|
26
26
|
logger = logging.getLogger(__name__)
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
async def remove_artifact(registry_handler_config: RegistryHandlerBaseConfig, packages: list[dict[str, str]]) -> None:
|
|
30
30
|
|
|
31
|
-
from
|
|
32
|
-
from
|
|
31
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
32
|
+
from nat.registry_handlers.schemas.package import PackageNameVersionList
|
|
33
33
|
|
|
34
34
|
registry = GlobalTypeRegistry.get()
|
|
35
35
|
|
|
@@ -48,7 +48,7 @@ async def remove_artifact(registry_handler_config: RegistryHandlerBaseConfig, pa
|
|
|
48
48
|
|
|
49
49
|
@click.group(name=__name__,
|
|
50
50
|
invoke_without_command=True,
|
|
51
|
-
help=("Remove
|
|
51
|
+
help=("Remove NAT artifact from a remote registry by name and version."))
|
|
52
52
|
@click.argument("packages", type=str)
|
|
53
53
|
@click.option(
|
|
54
54
|
"--config_file",
|
|
@@ -62,14 +62,14 @@ async def remove_artifact(registry_handler_config: RegistryHandlerBaseConfig, pa
|
|
|
62
62
|
"--channel",
|
|
63
63
|
type=str,
|
|
64
64
|
required=True,
|
|
65
|
-
help=("The remote registry channel that will remove the
|
|
65
|
+
help=("The remote registry channel that will remove the NAT artifact."),
|
|
66
66
|
)
|
|
67
67
|
def remove(channel: str, config_file: str, packages: str) -> None:
|
|
68
68
|
"""
|
|
69
|
-
Remove
|
|
69
|
+
Remove NAT artifacts from a remote registry.
|
|
70
70
|
"""
|
|
71
71
|
|
|
72
|
-
from
|
|
72
|
+
from nat.settings.global_settings import GlobalSettings
|
|
73
73
|
|
|
74
74
|
# Extract package name and version
|
|
75
75
|
packages = packages.split()
|
|
@@ -20,11 +20,11 @@ from pathlib import Path
|
|
|
20
20
|
|
|
21
21
|
import click
|
|
22
22
|
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
23
|
+
from nat.data_models.component import ComponentEnum
|
|
24
|
+
from nat.data_models.registry_handler import RegistryHandlerBaseConfig
|
|
25
|
+
from nat.registry_handlers.schemas.search import SearchFields
|
|
26
|
+
from nat.registry_handlers.schemas.status import StatusEnum
|
|
27
|
+
from nat.utils.data_models.schema_validator import validate_yaml
|
|
28
28
|
|
|
29
29
|
logger = logging.getLogger(__name__)
|
|
30
30
|
|
|
@@ -34,12 +34,12 @@ async def search_artifacts( # pylint: disable=R0917
|
|
|
34
34
|
query: str,
|
|
35
35
|
search_fields: list[SearchFields],
|
|
36
36
|
visualize: bool,
|
|
37
|
-
component_types: list[
|
|
37
|
+
component_types: list[ComponentEnum],
|
|
38
38
|
save_path: str | None = None,
|
|
39
39
|
n_results: int = 10) -> None:
|
|
40
40
|
|
|
41
|
-
from
|
|
42
|
-
from
|
|
41
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
42
|
+
from nat.registry_handlers.schemas.search import SearchQuery
|
|
43
43
|
|
|
44
44
|
registry = GlobalTypeRegistry.get()
|
|
45
45
|
|
|
@@ -49,7 +49,7 @@ async def search_artifacts( # pylint: disable=R0917
|
|
|
49
49
|
registry_handler = await stack.enter_async_context(registry_handler_info.build_fn(registry_handler_config))
|
|
50
50
|
|
|
51
51
|
if (len(component_types) == 0):
|
|
52
|
-
component_types = [t.value for t in
|
|
52
|
+
component_types = [t.value for t in ComponentEnum]
|
|
53
53
|
|
|
54
54
|
query = SearchQuery(query=query, fields=search_fields, top_k=n_results, component_types=component_types)
|
|
55
55
|
|
|
@@ -62,7 +62,7 @@ async def search_artifacts( # pylint: disable=R0917
|
|
|
62
62
|
registry_handler.save_search_results(search_response=search_response, save_path=save_path)
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
@click.group(name=__name__, invoke_without_command=True, help="Search for
|
|
65
|
+
@click.group(name=__name__, invoke_without_command=True, help="Search for NAT artifacts from remote registry.")
|
|
66
66
|
@click.option(
|
|
67
67
|
"--config_file",
|
|
68
68
|
type=click.Path(exists=True, file_okay=True, dir_okay=False, path_type=Path),
|
|
@@ -75,7 +75,7 @@ async def search_artifacts( # pylint: disable=R0917
|
|
|
75
75
|
"--channel",
|
|
76
76
|
type=str,
|
|
77
77
|
required=True,
|
|
78
|
-
help=("The remote registry channel to use when pulling the
|
|
78
|
+
help=("The remote registry channel to use when pulling the NAT artifact."),
|
|
79
79
|
)
|
|
80
80
|
@click.option(
|
|
81
81
|
"-o",
|
|
@@ -112,7 +112,7 @@ async def search_artifacts( # pylint: disable=R0917
|
|
|
112
112
|
"--types",
|
|
113
113
|
"component_types",
|
|
114
114
|
multiple=True,
|
|
115
|
-
type=click.Choice([e.value for e in
|
|
115
|
+
type=click.Choice([e.value for e in ComponentEnum], case_sensitive=False),
|
|
116
116
|
required=False,
|
|
117
117
|
help=("The component types to include in search."),
|
|
118
118
|
)
|
|
@@ -121,14 +121,14 @@ def search( # pylint: disable=R0917
|
|
|
121
121
|
channel: str,
|
|
122
122
|
fields: list[str],
|
|
123
123
|
query: str,
|
|
124
|
-
component_types: list[
|
|
124
|
+
component_types: list[ComponentEnum],
|
|
125
125
|
n_results: int,
|
|
126
126
|
output_path: str) -> None:
|
|
127
127
|
"""
|
|
128
|
-
Search for
|
|
128
|
+
Search for NAT artifacts with the specified configuration.
|
|
129
129
|
"""
|
|
130
130
|
|
|
131
|
-
from
|
|
131
|
+
from nat.settings.global_settings import GlobalSettings
|
|
132
132
|
|
|
133
133
|
settings = GlobalSettings().get()
|
|
134
134
|
|
|
@@ -20,9 +20,9 @@ from pathlib import Path
|
|
|
20
20
|
import click
|
|
21
21
|
from tabulate import tabulate
|
|
22
22
|
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
23
|
+
from nat.profiler.calc.calc_runner import CalcRunner
|
|
24
|
+
from nat.profiler.calc.data_models import CalcRunnerConfig
|
|
25
|
+
from nat.profiler.calc.data_models import CalcRunnerOutput
|
|
26
26
|
|
|
27
27
|
logger = logging.getLogger(__name__)
|
|
28
28
|
|
|
@@ -23,12 +23,12 @@ from pathlib import Path
|
|
|
23
23
|
import click
|
|
24
24
|
from pydantic_core import SchemaValidator
|
|
25
25
|
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
26
|
+
from nat.cli.cli_utils.config_override import load_and_override_config
|
|
27
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
28
|
+
from nat.cli.type_registry import RegisteredFrontEndInfo
|
|
29
|
+
from nat.data_models.config import Config
|
|
30
|
+
from nat.utils.data_models.schema_validator import validate_schema
|
|
31
|
+
from nat.utils.type_utils import DecomposedType
|
|
32
32
|
|
|
33
33
|
logger = logging.getLogger(__name__)
|
|
34
34
|
|
|
@@ -133,8 +133,8 @@ class StartCommandGroup(click.Group):
|
|
|
133
133
|
if (self._commands is not None):
|
|
134
134
|
return self._commands
|
|
135
135
|
|
|
136
|
-
from
|
|
137
|
-
from
|
|
136
|
+
from nat.runtime.loader import PluginTypes
|
|
137
|
+
from nat.runtime.loader import discover_and_register_plugins
|
|
138
138
|
|
|
139
139
|
# Only load front ends here for performance. Ensures a responsive CLI
|
|
140
140
|
discover_and_register_plugins(PluginTypes.FRONT_END)
|
|
@@ -149,7 +149,7 @@ class StartCommandGroup(click.Group):
|
|
|
149
149
|
|
|
150
150
|
# Build the command parameters
|
|
151
151
|
params: list[click.Parameter] = self._build_params(registered_front_end)
|
|
152
|
-
help_msg = f"Run
|
|
152
|
+
help_msg = f"Run a NAT workflow using the {registered_front_end.local_name} front end."
|
|
153
153
|
|
|
154
154
|
cmd = click.Command(name=registered_front_end.local_name,
|
|
155
155
|
params=params,
|
|
@@ -169,8 +169,8 @@ class StartCommandGroup(click.Group):
|
|
|
169
169
|
override: tuple[tuple[str, str], ...],
|
|
170
170
|
**kwargs) -> int | None:
|
|
171
171
|
|
|
172
|
-
from
|
|
173
|
-
from
|
|
172
|
+
from nat.runtime.loader import PluginTypes
|
|
173
|
+
from nat.runtime.loader import discover_and_register_plugins
|
|
174
174
|
|
|
175
175
|
if (config_file is None):
|
|
176
176
|
raise click.ClickException("No config file provided.")
|
|
@@ -178,14 +178,14 @@ class StartCommandGroup(click.Group):
|
|
|
178
178
|
# Here we need to ensure all objects are loaded before we try to create the config object
|
|
179
179
|
discover_and_register_plugins(PluginTypes.CONFIG_OBJECT)
|
|
180
180
|
|
|
181
|
-
logger.info("Starting
|
|
181
|
+
logger.info("Starting NAT from config file: '%s'", config_file)
|
|
182
182
|
|
|
183
183
|
config_dict = load_and_override_config(config_file, override)
|
|
184
184
|
|
|
185
185
|
# Get the front end for the command
|
|
186
186
|
front_end: RegisteredFrontEndInfo = self._registered_front_ends[cmd_name]
|
|
187
187
|
|
|
188
|
-
config = validate_schema(config_dict,
|
|
188
|
+
config = validate_schema(config_dict, Config)
|
|
189
189
|
|
|
190
190
|
# Override default front end config with values from the config file for serverless execution modes.
|
|
191
191
|
# Check that we have the right kind of front end
|
|
@@ -238,9 +238,9 @@ class StartCommandGroup(click.Group):
|
|
|
238
238
|
|
|
239
239
|
@click.command(name=__name__,
|
|
240
240
|
invoke_without_command=False,
|
|
241
|
-
help="Run
|
|
241
|
+
help="Run a NAT workflow using a front end configuration.",
|
|
242
242
|
cls=StartCommandGroup)
|
|
243
243
|
@click.pass_context
|
|
244
244
|
def start_command(ctx: click.Context, **kwargs) -> None:
|
|
245
|
-
"""Run
|
|
245
|
+
"""Run a NAT workflow using a front end configuration."""
|
|
246
246
|
pass
|
|
@@ -24,11 +24,11 @@ logger = logging.getLogger(__name__)
|
|
|
24
24
|
|
|
25
25
|
async def uninstall_packages(packages: list[dict[str, str]]) -> None:
|
|
26
26
|
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
27
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
28
|
+
from nat.registry_handlers.schemas.package import PackageNameVersionList
|
|
29
|
+
from nat.runtime.loader import PluginTypes
|
|
30
|
+
from nat.runtime.loader import discover_and_register_plugins
|
|
31
|
+
from nat.settings.global_settings import GlobalSettings
|
|
32
32
|
|
|
33
33
|
discover_and_register_plugins(PluginTypes.CONFIG_OBJECT)
|
|
34
34
|
|
|
@@ -28,7 +28,7 @@ def validate_command(config_file: Path):
|
|
|
28
28
|
# load function level dependencies
|
|
29
29
|
from io import StringIO
|
|
30
30
|
|
|
31
|
-
from
|
|
31
|
+
from nat.runtime.loader import load_config
|
|
32
32
|
|
|
33
33
|
try:
|
|
34
34
|
click.echo(f"Validating configuration file: {config_file}")
|
|
@@ -9,14 +9,14 @@ root = "{{ rel_path_to_repo_root}}"{% else %}requires = ["setuptools >= 64"]{% e
|
|
|
9
9
|
name = "{{ package_name }}"
|
|
10
10
|
{% if editable %}dynamic = ["version"]{% else %}version = "0.1.0"{% endif %}
|
|
11
11
|
dependencies = [
|
|
12
|
-
"
|
|
12
|
+
"nvidia-nat[langchain]",
|
|
13
13
|
]
|
|
14
14
|
requires-python = ">=3.11,<3.13"
|
|
15
|
-
description = "Custom
|
|
15
|
+
description = "Custom NeMo Agent Toolkit Workflow"
|
|
16
16
|
classifiers = ["Programming Language :: Python"]
|
|
17
17
|
|
|
18
18
|
{% if editable %}[tool.uv.sources]
|
|
19
|
-
|
|
19
|
+
nvidia-nat = { path = "{{ rel_path_to_repo_root}}", editable = true }{% endif %}
|
|
20
20
|
|
|
21
|
-
[project.entry-points.'
|
|
21
|
+
[project.entry-points.'nat.components']
|
|
22
22
|
{{ package_name }} = "{{ package_name }}.register"
|