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
|
@@ -18,19 +18,19 @@ import subprocess
|
|
|
18
18
|
from collections.abc import AsyncGenerator
|
|
19
19
|
from contextlib import asynccontextmanager
|
|
20
20
|
|
|
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
|
|
21
|
+
from nat.registry_handlers.package_utils import build_package_metadata
|
|
22
|
+
from nat.registry_handlers.registry_handler_base import AbstractRegistryHandler
|
|
23
|
+
from nat.registry_handlers.schemas.package import PackageNameVersionList
|
|
24
|
+
from nat.registry_handlers.schemas.publish import Artifact
|
|
25
|
+
from nat.registry_handlers.schemas.publish import PublishResponse
|
|
26
|
+
from nat.registry_handlers.schemas.pull import PullRequestPackages
|
|
27
|
+
from nat.registry_handlers.schemas.pull import PullResponse
|
|
28
|
+
from nat.registry_handlers.schemas.remove import RemoveResponse
|
|
29
|
+
from nat.registry_handlers.schemas.search import SearchFields
|
|
30
|
+
from nat.registry_handlers.schemas.search import SearchQuery
|
|
31
|
+
from nat.registry_handlers.schemas.search import SearchResponse
|
|
32
|
+
from nat.registry_handlers.schemas.status import ActionEnum
|
|
33
|
+
from nat.registry_handlers.schemas.status import StatusEnum
|
|
34
34
|
|
|
35
35
|
logger = logging.getLogger(__name__)
|
|
36
36
|
|
|
@@ -41,11 +41,11 @@ class LocalRegistryHandler(AbstractRegistryHandler):
|
|
|
41
41
|
search_fields: list[SearchFields] = [field for field in SearchFields if field != SearchFields.ALL]
|
|
42
42
|
|
|
43
43
|
@asynccontextmanager
|
|
44
|
-
async def publish(self, artifact:
|
|
45
|
-
"""Publishes
|
|
44
|
+
async def publish(self, artifact: Artifact) -> AsyncGenerator[PublishResponse]:
|
|
45
|
+
"""Publishes a NAT artifact to a local registry.
|
|
46
46
|
|
|
47
47
|
Args:
|
|
48
|
-
artifact (
|
|
48
|
+
artifact (Artifact): An artifact that contain NAT plugin wheel and it's corrosponding discovery
|
|
49
49
|
metadata.
|
|
50
50
|
|
|
51
51
|
Yields:
|
|
@@ -62,10 +62,10 @@ class LocalRegistryHandler(AbstractRegistryHandler):
|
|
|
62
62
|
|
|
63
63
|
@asynccontextmanager
|
|
64
64
|
async def pull(self, packages: PullRequestPackages) -> AsyncGenerator[PullResponse]:
|
|
65
|
-
"""Download and install
|
|
65
|
+
"""Download and install NAT artifacts from a local registry.
|
|
66
66
|
|
|
67
67
|
Args:
|
|
68
|
-
packages (PullRequestPackages): Parameters used to pull the
|
|
68
|
+
packages (PullRequestPackages): Parameters used to pull the NAT artifact.
|
|
69
69
|
|
|
70
70
|
Yields:
|
|
71
71
|
Iterator[AsyncGenerator[PullResponse]]: A response message that includes a the pulled packages and a
|
|
@@ -83,7 +83,7 @@ class LocalRegistryHandler(AbstractRegistryHandler):
|
|
|
83
83
|
|
|
84
84
|
@asynccontextmanager
|
|
85
85
|
async def search(self, query: SearchQuery) -> AsyncGenerator[SearchResponse]:
|
|
86
|
-
"""Searches the local
|
|
86
|
+
"""Searches the local nat registry for relevant NAT components.
|
|
87
87
|
|
|
88
88
|
Args:
|
|
89
89
|
query (SearchQuery): Parameters of the search to be performed.
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
17
|
|
|
18
|
-
from
|
|
19
|
-
from
|
|
18
|
+
from nat.cli.register_workflow import register_registry_handler
|
|
19
|
+
from nat.data_models.registry_handler import RegistryHandlerBaseConfig
|
|
20
20
|
|
|
21
21
|
logger = logging.getLogger(__name__)
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
class LocalRegistryHandlerConfig(RegistryHandlerBaseConfig, name="local"):
|
|
25
|
-
"""Interact with the local
|
|
25
|
+
"""Interact with the local NAT environment to search and uninstall NAT components."""
|
|
26
26
|
|
|
27
27
|
pass
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ class LocalRegistryHandlerConfig(RegistryHandlerBaseConfig, name="local"):
|
|
|
30
30
|
@register_registry_handler(config_type=LocalRegistryHandlerConfig)
|
|
31
31
|
async def local_registry_handler(config: LocalRegistryHandlerConfig):
|
|
32
32
|
|
|
33
|
-
from
|
|
33
|
+
from nat.registry_handlers.local.local_handler import LocalRegistryHandler
|
|
34
34
|
|
|
35
35
|
registry_handler = LocalRegistryHandler()
|
|
36
36
|
|
|
@@ -15,24 +15,24 @@
|
|
|
15
15
|
|
|
16
16
|
import logging
|
|
17
17
|
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
18
|
+
from nat.data_models.component import ComponentEnum
|
|
19
|
+
from nat.data_models.discovery_metadata import DiscoveryMetadata
|
|
20
|
+
from nat.data_models.discovery_metadata import DiscoveryStatusEnum
|
|
21
|
+
from nat.registry_handlers.schemas.package import WheelData
|
|
22
22
|
|
|
23
23
|
logger = logging.getLogger(__name__)
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class ComponentDiscoveryMetadata:
|
|
27
27
|
|
|
28
|
-
def __init__(self, component_type:
|
|
28
|
+
def __init__(self, component_type: ComponentEnum, wheel_data: WheelData | None = None):
|
|
29
29
|
self._component_type = component_type
|
|
30
30
|
self._metadata_items: list[dict | DiscoveryMetadata] = []
|
|
31
31
|
self._wheel_data: WheelData = wheel_data
|
|
32
32
|
|
|
33
33
|
def load_metadata(self):
|
|
34
34
|
|
|
35
|
-
from
|
|
35
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
36
36
|
|
|
37
37
|
registry = GlobalTypeRegistry.get()
|
|
38
38
|
|
|
@@ -55,6 +55,6 @@ class ComponentDiscoveryMetadata:
|
|
|
55
55
|
return self._metadata_items
|
|
56
56
|
|
|
57
57
|
@staticmethod
|
|
58
|
-
def from_package_component_type(component_type:
|
|
58
|
+
def from_package_component_type(component_type: ComponentEnum,
|
|
59
59
|
wheel_data: WheelData | None = None) -> "ComponentDiscoveryMetadata":
|
|
60
60
|
return ComponentDiscoveryMetadata(component_type=component_type, wheel_data=wheel_data)
|
|
@@ -22,12 +22,12 @@ from functools import lru_cache
|
|
|
22
22
|
|
|
23
23
|
from packaging.requirements import Requirement
|
|
24
24
|
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
25
|
+
from nat.data_models.component import ComponentEnum
|
|
26
|
+
from nat.data_models.discovery_metadata import DiscoveryMetadata
|
|
27
|
+
from nat.registry_handlers.schemas.package import WheelData
|
|
28
|
+
from nat.registry_handlers.schemas.publish import Artifact
|
|
29
|
+
from nat.runtime.loader import PluginTypes
|
|
30
|
+
from nat.runtime.loader import discover_entrypoints
|
|
31
31
|
|
|
32
32
|
# pylint: disable=redefined-outer-name
|
|
33
33
|
logger = logging.getLogger(__name__)
|
|
@@ -89,13 +89,13 @@ def resolve_extras_to_packages(package_name: str, extras: list[str]) -> set[str]
|
|
|
89
89
|
"""Resolve package extras to their actual package dependencies.
|
|
90
90
|
|
|
91
91
|
Args:
|
|
92
|
-
package_name (str): The base package name (e.g., '
|
|
92
|
+
package_name (str): The base package name (e.g., 'nvidia-nat')
|
|
93
93
|
extras (list[str]): List of extra names (e.g., ['langchain', 'telemetry'])
|
|
94
94
|
|
|
95
95
|
Returns:
|
|
96
96
|
set[str]: Set of additional package names that the extras resolve to
|
|
97
|
-
(e.g., {'
|
|
98
|
-
'
|
|
97
|
+
(e.g., {'nvidia-nat-langchain', 'nvidia-nat-opentelemetry', 'nvidia-nat-phoenix',
|
|
98
|
+
'nvidia-nat-weave', 'nvidia-nat-ragaai'})
|
|
99
99
|
"""
|
|
100
100
|
resolved_packages = set()
|
|
101
101
|
|
|
@@ -149,8 +149,8 @@ def extract_dependencies_with_extras_resolved(pyproject_path: str) -> set[str]:
|
|
|
149
149
|
set[str]: Set of all dependency names including those resolved from extras
|
|
150
150
|
|
|
151
151
|
Example:
|
|
152
|
-
For a dependency like "
|
|
153
|
-
{'
|
|
152
|
+
For a dependency like "nat[langchain,telemetry]~=1.2", this will return:
|
|
153
|
+
{'nvidia-nat', 'nvidia-nat-langchain', 'nvidia-nat-opentelemetry', 'nvidia-nat-phoenix', ...}
|
|
154
154
|
|
|
155
155
|
Raises:
|
|
156
156
|
FileNotFoundError: If the pyproject.toml file doesn't exist
|
|
@@ -287,7 +287,7 @@ def get_transitive_dependencies(distribution_names: list[str]) -> dict[str, set[
|
|
|
287
287
|
This function recursively resolves all dependencies for the given distribution names,
|
|
288
288
|
returning a mapping of each package to its complete set of transitive dependencies.
|
|
289
289
|
This is useful when publishing plugins to remote registries that contain with nested dependencies,
|
|
290
|
-
ensuring that all dependencies are included in the
|
|
290
|
+
ensuring that all dependencies are included in the Artifact's metadata.
|
|
291
291
|
|
|
292
292
|
Args:
|
|
293
293
|
distribution_names (list[str]): List of Python distribution names (package names) to analyze.
|
|
@@ -408,7 +408,7 @@ def get_all_transitive_dependencies(distribution_names: list[str]) -> set[str]:
|
|
|
408
408
|
|
|
409
409
|
Returns a flattened set of all unique dependencies across all the provided distribution names.
|
|
410
410
|
This is useful when publishing plugins to remote registries that contain with nested dependencies,
|
|
411
|
-
ensuring that all dependencies are included in the
|
|
411
|
+
ensuring that all dependencies are included in the Artifact's metadata.
|
|
412
412
|
|
|
413
413
|
Args:
|
|
414
414
|
distribution_names: List of Python distribution names (package names) to analyze
|
|
@@ -449,7 +449,7 @@ def build_wheel(package_root: str) -> WheelData:
|
|
|
449
449
|
|
|
450
450
|
toml_project: dict = data.get("project", {})
|
|
451
451
|
toml_project_name = toml_project.get("name", None)
|
|
452
|
-
toml_packages = set(i for i in data.get("project", {}).get("entry-points", {}).get("
|
|
452
|
+
toml_packages = set(i for i in data.get("project", {}).get("entry-points", {}).get("nat.plugins", {}))
|
|
453
453
|
|
|
454
454
|
# Extract dependencies using the robust requirement parser with extras resolution
|
|
455
455
|
try:
|
|
@@ -488,43 +488,43 @@ def build_wheel(package_root: str) -> WheelData:
|
|
|
488
488
|
|
|
489
489
|
os.chdir(working_dir)
|
|
490
490
|
|
|
491
|
-
whl_version = Wheel(whl_path).version
|
|
491
|
+
whl_version = Wheel(whl_path).version or "unknown"
|
|
492
492
|
|
|
493
493
|
return WheelData(package_root=package_root,
|
|
494
494
|
package_name=toml_project_name,
|
|
495
495
|
toml_project=toml_project,
|
|
496
496
|
toml_dependencies=toml_dependencies,
|
|
497
|
-
|
|
497
|
+
toml_nat_packages=toml_packages,
|
|
498
498
|
union_dependencies=union_dependencies,
|
|
499
499
|
whl_path=whl_path,
|
|
500
500
|
whl_base64=whl_base64,
|
|
501
501
|
whl_version=whl_version)
|
|
502
502
|
|
|
503
503
|
|
|
504
|
-
def build_package_metadata(wheel_data: WheelData | None) -> dict[
|
|
505
|
-
"""Loads discovery metadata for all registered
|
|
504
|
+
def build_package_metadata(wheel_data: WheelData | None) -> dict[ComponentEnum, list[dict | DiscoveryMetadata]]:
|
|
505
|
+
"""Loads discovery metadata for all registered NAT components included in this Python package.
|
|
506
506
|
|
|
507
507
|
Args:
|
|
508
508
|
wheel_data (WheelData): Data model containing a built python wheel and its corresponding metadata.
|
|
509
509
|
|
|
510
510
|
Returns:
|
|
511
|
-
dict[
|
|
511
|
+
dict[ComponentEnum, list[typing.Union[dict, DiscoveryMetadata]]]: List containing each components discovery
|
|
512
512
|
metadata.
|
|
513
513
|
"""
|
|
514
514
|
|
|
515
|
-
from
|
|
516
|
-
from
|
|
517
|
-
from
|
|
515
|
+
from nat.cli.type_registry import GlobalTypeRegistry
|
|
516
|
+
from nat.registry_handlers.metadata_factory import ComponentDiscoveryMetadata
|
|
517
|
+
from nat.runtime.loader import discover_and_register_plugins
|
|
518
518
|
|
|
519
519
|
discover_and_register_plugins(PluginTypes.ALL)
|
|
520
520
|
|
|
521
521
|
registry = GlobalTypeRegistry.get()
|
|
522
522
|
|
|
523
|
-
|
|
523
|
+
nat_plugins = discover_entrypoints(PluginTypes.ALL)
|
|
524
524
|
|
|
525
525
|
if (wheel_data is not None):
|
|
526
526
|
registry.register_package(package_name=wheel_data.package_name, package_version=wheel_data.whl_version)
|
|
527
|
-
for entry_point in
|
|
527
|
+
for entry_point in nat_plugins:
|
|
528
528
|
package_name = entry_point.dist.name
|
|
529
529
|
if (package_name == wheel_data.package_name):
|
|
530
530
|
continue
|
|
@@ -532,13 +532,13 @@ def build_package_metadata(wheel_data: WheelData | None) -> dict[AIQComponentEnu
|
|
|
532
532
|
registry.register_package(package_name=package_name)
|
|
533
533
|
|
|
534
534
|
else:
|
|
535
|
-
for entry_point in
|
|
535
|
+
for entry_point in nat_plugins:
|
|
536
536
|
registry.register_package(package_name=entry_point.dist.name)
|
|
537
537
|
|
|
538
538
|
discovery_metadata = {}
|
|
539
|
-
for component_type in
|
|
539
|
+
for component_type in ComponentEnum:
|
|
540
540
|
|
|
541
|
-
if (component_type ==
|
|
541
|
+
if (component_type == ComponentEnum.UNDEFINED):
|
|
542
542
|
continue
|
|
543
543
|
component_metadata = ComponentDiscoveryMetadata.from_package_component_type(wheel_data=wheel_data,
|
|
544
544
|
component_type=component_type)
|
|
@@ -548,20 +548,24 @@ def build_package_metadata(wheel_data: WheelData | None) -> dict[AIQComponentEnu
|
|
|
548
548
|
return discovery_metadata
|
|
549
549
|
|
|
550
550
|
|
|
551
|
-
def
|
|
552
|
-
"""Builds a complete
|
|
551
|
+
def build_artifact(package_root: str) -> Artifact:
|
|
552
|
+
"""Builds a complete NeMo Agent toolkit Artifact that can be published for discovery and reuse.
|
|
553
553
|
|
|
554
554
|
Args:
|
|
555
555
|
package_root (str): Path to root of python package
|
|
556
556
|
|
|
557
557
|
Returns:
|
|
558
|
-
|
|
558
|
+
Artifact: A publishable Artifact containing package wheel and discovery metadata.
|
|
559
559
|
"""
|
|
560
560
|
|
|
561
|
-
from
|
|
561
|
+
from nat.registry_handlers.schemas.publish import BuiltArtifact
|
|
562
562
|
|
|
563
563
|
wheel_data = build_wheel(package_root=package_root)
|
|
564
564
|
metadata = build_package_metadata(wheel_data=wheel_data)
|
|
565
|
-
built_artifact =
|
|
565
|
+
built_artifact = BuiltArtifact(whl=wheel_data.whl_base64, metadata=metadata)
|
|
566
566
|
|
|
567
|
-
return
|
|
567
|
+
return Artifact(artifact=built_artifact, whl_path=wheel_data.whl_path)
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
# Compatibility alias
|
|
571
|
+
build_aiq_artifact = build_artifact
|
|
@@ -18,20 +18,20 @@ import subprocess
|
|
|
18
18
|
from collections.abc import AsyncGenerator
|
|
19
19
|
from contextlib import asynccontextmanager
|
|
20
20
|
|
|
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
|
|
21
|
+
from nat.data_models.component import ComponentEnum
|
|
22
|
+
from nat.registry_handlers.registry_handler_base import AbstractRegistryHandler
|
|
23
|
+
from nat.registry_handlers.schemas.package import PackageNameVersionList
|
|
24
|
+
from nat.registry_handlers.schemas.publish import Artifact
|
|
25
|
+
from nat.registry_handlers.schemas.publish import PublishResponse
|
|
26
|
+
from nat.registry_handlers.schemas.pull import PackageNameVersion
|
|
27
|
+
from nat.registry_handlers.schemas.pull import PullRequestPackages
|
|
28
|
+
from nat.registry_handlers.schemas.pull import PullResponse
|
|
29
|
+
from nat.registry_handlers.schemas.remove import RemoveResponse
|
|
30
|
+
from nat.registry_handlers.schemas.search import SearchQuery
|
|
31
|
+
from nat.registry_handlers.schemas.search import SearchResponse
|
|
32
|
+
from nat.registry_handlers.schemas.search import SearchResponseItem
|
|
33
|
+
from nat.registry_handlers.schemas.status import ActionEnum
|
|
34
|
+
from nat.registry_handlers.schemas.status import StatusEnum
|
|
35
35
|
|
|
36
36
|
logger = logging.getLogger(__name__)
|
|
37
37
|
|
|
@@ -59,11 +59,11 @@ class PypiRegistryHandler(AbstractRegistryHandler):
|
|
|
59
59
|
self._search_route = search_route.strip("/")
|
|
60
60
|
|
|
61
61
|
@asynccontextmanager
|
|
62
|
-
async def publish(self, artifact:
|
|
63
|
-
"""Publishes
|
|
62
|
+
async def publish(self, artifact: Artifact) -> AsyncGenerator[PublishResponse]:
|
|
63
|
+
"""Publishes a NAT artifact to a PyPI remote registry.
|
|
64
64
|
|
|
65
65
|
Args:
|
|
66
|
-
artifact (
|
|
66
|
+
artifact (Artifact): An artifact that contain NAT plugin wheel and it's corrosponding discovery
|
|
67
67
|
metadata.
|
|
68
68
|
|
|
69
69
|
Yields:
|
|
@@ -101,10 +101,10 @@ class PypiRegistryHandler(AbstractRegistryHandler):
|
|
|
101
101
|
|
|
102
102
|
@asynccontextmanager
|
|
103
103
|
async def pull(self, packages: PullRequestPackages) -> AsyncGenerator[PullResponse]:
|
|
104
|
-
"""Download and install
|
|
104
|
+
"""Download and install NAT artifacts from a remote PyPI remote registry.
|
|
105
105
|
|
|
106
106
|
Args:
|
|
107
|
-
packages (PullRequestPackages): Parameters used to pull the
|
|
107
|
+
packages (PullRequestPackages): Parameters used to pull the NAT artifact.
|
|
108
108
|
|
|
109
109
|
Yields:
|
|
110
110
|
Iterator[AsyncGenerator[PullResponse, None]]: A response message that includes a the pulled packages and a
|
|
@@ -160,7 +160,7 @@ class PypiRegistryHandler(AbstractRegistryHandler):
|
|
|
160
160
|
|
|
161
161
|
@asynccontextmanager
|
|
162
162
|
async def search(self, query: SearchQuery) -> AsyncGenerator[SearchResponse]:
|
|
163
|
-
"""Searches a remote PyPI registry for relevant
|
|
163
|
+
"""Searches a remote PyPI registry for relevant NAT components.
|
|
164
164
|
|
|
165
165
|
Args:
|
|
166
166
|
query (SearchQuery): Parameters of the search to be performed.
|
|
@@ -192,7 +192,7 @@ class PypiRegistryHandler(AbstractRegistryHandler):
|
|
|
192
192
|
|
|
193
193
|
search_resp_item = SearchResponseItem(package=package,
|
|
194
194
|
version=version,
|
|
195
|
-
component_type=
|
|
195
|
+
component_type=ComponentEnum.PACKAGE,
|
|
196
196
|
component_name=package,
|
|
197
197
|
description="",
|
|
198
198
|
developer_notes="")
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
from pydantic import Field
|
|
17
17
|
|
|
18
|
-
from
|
|
19
|
-
from
|
|
18
|
+
from nat.cli.register_workflow import register_registry_handler
|
|
19
|
+
from nat.data_models.registry_handler import RegistryHandlerBaseConfig
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class PypiRegistryHandlerConfig(RegistryHandlerBaseConfig, name="pypi"):
|
|
@@ -25,15 +25,15 @@ class PypiRegistryHandlerConfig(RegistryHandlerBaseConfig, name="pypi"):
|
|
|
25
25
|
endpoint: str = Field(description="A string representing the remote endpoint.")
|
|
26
26
|
token: str | None = Field(default=None,
|
|
27
27
|
description="The authentication token to use when interacting with the registry.")
|
|
28
|
-
publish_route: str = Field(description="The route to the
|
|
29
|
-
pull_route: str = Field(description="The route to the
|
|
30
|
-
search_route: str = Field(default="simple", description="The route to the
|
|
28
|
+
publish_route: str = Field(description="The route to the NAT publish service.")
|
|
29
|
+
pull_route: str = Field(description="The route to the NAT pull service.")
|
|
30
|
+
search_route: str = Field(default="simple", description="The route to the NAT search service.")
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
@register_registry_handler(config_type=PypiRegistryHandlerConfig)
|
|
34
34
|
async def pypi_publish_registry_handler(config: PypiRegistryHandlerConfig):
|
|
35
35
|
|
|
36
|
-
from
|
|
36
|
+
from nat.registry_handlers.pypi.pypi_handler import PypiRegistryHandler
|
|
37
37
|
|
|
38
38
|
registry_handler = PypiRegistryHandler(endpoint=config.endpoint, token=config.token)
|
|
39
39
|
|
|
@@ -19,36 +19,36 @@ from collections.abc import AsyncGenerator
|
|
|
19
19
|
from contextlib import asynccontextmanager
|
|
20
20
|
from enum import Enum
|
|
21
21
|
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
32
|
-
from
|
|
22
|
+
from nat.data_models.component import ComponentEnum
|
|
23
|
+
from nat.data_models.discovery_metadata import DiscoveryMetadata
|
|
24
|
+
from nat.registry_handlers.schemas.package import PackageNameVersionList
|
|
25
|
+
from nat.registry_handlers.schemas.publish import Artifact
|
|
26
|
+
from nat.registry_handlers.schemas.publish import PublishResponse
|
|
27
|
+
from nat.registry_handlers.schemas.pull import PullRequestPackages
|
|
28
|
+
from nat.registry_handlers.schemas.pull import PullResponse
|
|
29
|
+
from nat.registry_handlers.schemas.remove import RemoveResponse
|
|
30
|
+
from nat.registry_handlers.schemas.search import SearchQuery
|
|
31
|
+
from nat.registry_handlers.schemas.search import SearchResponse
|
|
32
|
+
from nat.registry_handlers.schemas.search import VisualizeFields
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class AbstractRegistryHandler(ABC):
|
|
36
|
-
"""Base class outlining the interfaces for remote
|
|
36
|
+
"""Base class outlining the interfaces for remote NAT registry interactions."""
|
|
37
37
|
|
|
38
38
|
def __init__(self):
|
|
39
|
-
self._discovery_metadata: dict[
|
|
40
|
-
self.
|
|
39
|
+
self._discovery_metadata: dict[ComponentEnum, list[dict | DiscoveryMetadata]] = {}
|
|
40
|
+
self._nat_artifact: Artifact | None = None
|
|
41
41
|
self._whl_bytes: bytes
|
|
42
42
|
self._whl_path: str
|
|
43
43
|
self._whl_base64: str
|
|
44
44
|
|
|
45
45
|
@abstractmethod
|
|
46
46
|
@asynccontextmanager
|
|
47
|
-
async def publish(self, artifact:
|
|
48
|
-
"""Publishes
|
|
47
|
+
async def publish(self, artifact: Artifact) -> AsyncGenerator[PublishResponse]:
|
|
48
|
+
"""Publishes a NAT artifact to a remote registry.
|
|
49
49
|
|
|
50
50
|
Args:
|
|
51
|
-
artifact (
|
|
51
|
+
artifact (Artifact): An artifact that contain NAT plugin wheel and it's corrosponding discovery
|
|
52
52
|
metadata.
|
|
53
53
|
|
|
54
54
|
Yields:
|
|
@@ -61,10 +61,10 @@ class AbstractRegistryHandler(ABC):
|
|
|
61
61
|
@abstractmethod
|
|
62
62
|
@asynccontextmanager
|
|
63
63
|
async def pull(self, packages: PullRequestPackages) -> AsyncGenerator[PullResponse]:
|
|
64
|
-
"""Download and install
|
|
64
|
+
"""Download and install NAT artifacts from a remote registry.
|
|
65
65
|
|
|
66
66
|
Args:
|
|
67
|
-
packages (PullRequestPackages): Parameters used to pull the
|
|
67
|
+
packages (PullRequestPackages): Parameters used to pull the NAT artifact.
|
|
68
68
|
|
|
69
69
|
Yields:
|
|
70
70
|
Iterator[AsyncGenerator[PullResponse]]: A response message that includes a the pulled packages and a
|
|
@@ -76,7 +76,7 @@ class AbstractRegistryHandler(ABC):
|
|
|
76
76
|
@abstractmethod
|
|
77
77
|
@asynccontextmanager
|
|
78
78
|
async def search(self, query: SearchQuery) -> AsyncGenerator[SearchResponse]:
|
|
79
|
-
"""Searches the local
|
|
79
|
+
"""Searches the local nat registry for relevant NAT components.
|
|
80
80
|
|
|
81
81
|
Args:
|
|
82
82
|
query (SearchQuery): Parameters of the search to be performed.
|
|
@@ -118,7 +118,7 @@ class AbstractRegistryHandler(ABC):
|
|
|
118
118
|
from rich.table import Table
|
|
119
119
|
from rich.text import Text
|
|
120
120
|
|
|
121
|
-
table = Table(title="
|
|
121
|
+
table = Table(title="NAT Search Results", padding=(0, 1), show_lines=True)
|
|
122
122
|
for column in VisualizeFields:
|
|
123
123
|
table.add_column(column.value)
|
|
124
124
|
|
|
@@ -17,8 +17,8 @@ import os
|
|
|
17
17
|
|
|
18
18
|
from pydantic import Field
|
|
19
19
|
|
|
20
|
-
from
|
|
21
|
-
from
|
|
20
|
+
from nat.cli.register_workflow import register_registry_handler
|
|
21
|
+
from nat.data_models.registry_handler import RegistryHandlerBaseConfig
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
class RestRegistryHandlerConfig(RegistryHandlerBaseConfig, name="rest"):
|
|
@@ -27,16 +27,16 @@ class RestRegistryHandlerConfig(RegistryHandlerBaseConfig, name="rest"):
|
|
|
27
27
|
endpoint: str = Field(description="A string representing the remote endpoint.")
|
|
28
28
|
token: str | None = Field(default=None,
|
|
29
29
|
description="The authentication token to use when interacting with the registry.")
|
|
30
|
-
publish_route: str = Field(default="", description="The route to the
|
|
31
|
-
pull_route: str = Field(default="", description="The route to the
|
|
32
|
-
search_route: str = Field(default="", description="The route to the
|
|
33
|
-
remove_route: str = Field(default="", description="The route to the
|
|
30
|
+
publish_route: str = Field(default="", description="The route to the NAT publish service.")
|
|
31
|
+
pull_route: str = Field(default="", description="The route to the NAT pull service.")
|
|
32
|
+
search_route: str = Field(default="", description="The route to the NAT search service")
|
|
33
|
+
remove_route: str = Field(default="", description="The route to the NAT remove service")
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
@register_registry_handler(config_type=RestRegistryHandlerConfig)
|
|
37
37
|
async def rest_search_handler(config: RestRegistryHandlerConfig):
|
|
38
38
|
|
|
39
|
-
from
|
|
39
|
+
from nat.registry_handlers.rest.rest_handler import RestRegistryHandler
|
|
40
40
|
|
|
41
41
|
if (config.token is None):
|
|
42
42
|
registry_token = os.getenv("REGISTRY_TOKEN")
|
|
@@ -23,18 +23,18 @@ from contextlib import asynccontextmanager
|
|
|
23
23
|
|
|
24
24
|
import httpx
|
|
25
25
|
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
from
|
|
35
|
-
from
|
|
36
|
-
from
|
|
37
|
-
from
|
|
26
|
+
from nat.registry_handlers.registry_handler_base import AbstractRegistryHandler
|
|
27
|
+
from nat.registry_handlers.schemas.headers import RequestHeaders
|
|
28
|
+
from nat.registry_handlers.schemas.package import PackageNameVersionList
|
|
29
|
+
from nat.registry_handlers.schemas.publish import Artifact
|
|
30
|
+
from nat.registry_handlers.schemas.publish import PublishResponse
|
|
31
|
+
from nat.registry_handlers.schemas.pull import PullRequestPackages
|
|
32
|
+
from nat.registry_handlers.schemas.pull import PullResponse
|
|
33
|
+
from nat.registry_handlers.schemas.remove import RemoveResponse
|
|
34
|
+
from nat.registry_handlers.schemas.search import SearchQuery
|
|
35
|
+
from nat.registry_handlers.schemas.search import SearchResponse
|
|
36
|
+
from nat.registry_handlers.schemas.status import ActionEnum
|
|
37
|
+
from nat.registry_handlers.schemas.status import StatusEnum
|
|
38
38
|
|
|
39
39
|
logger = logging.getLogger(__name__)
|
|
40
40
|
|
|
@@ -61,11 +61,11 @@ class RestRegistryHandler(AbstractRegistryHandler):
|
|
|
61
61
|
self._headers = RequestHeaders(Authorization=f"Bearer: {token}").model_dump(by_alias=True)
|
|
62
62
|
|
|
63
63
|
@asynccontextmanager
|
|
64
|
-
async def publish(self, artifact:
|
|
65
|
-
"""Publishes
|
|
64
|
+
async def publish(self, artifact: Artifact) -> AsyncGenerator[PublishResponse]:
|
|
65
|
+
"""Publishes a NAT artifact to a remote REST registry.
|
|
66
66
|
|
|
67
67
|
Args:
|
|
68
|
-
artifact (
|
|
68
|
+
artifact (Artifact): An artifact that contain NAT plugin wheel and it's corrosponding discovery
|
|
69
69
|
metadata.
|
|
70
70
|
|
|
71
71
|
Yields:
|
|
@@ -98,17 +98,17 @@ class RestRegistryHandler(AbstractRegistryHandler):
|
|
|
98
98
|
|
|
99
99
|
@asynccontextmanager
|
|
100
100
|
async def pull(self, packages: PullRequestPackages) -> AsyncGenerator[PullResponse]:
|
|
101
|
-
"""Download and install
|
|
101
|
+
"""Download and install NAT artifacts from a remote REST registry.
|
|
102
102
|
|
|
103
103
|
Args:
|
|
104
|
-
packages (PullRequestPackages): Parameters used to pull the
|
|
104
|
+
packages (PullRequestPackages): Parameters used to pull the NAT artifact.
|
|
105
105
|
|
|
106
106
|
Yields:
|
|
107
107
|
Iterator[AsyncGenerator[PullResponse]]: A response message that includes a the pulled packages and a
|
|
108
108
|
completion status message.
|
|
109
109
|
"""
|
|
110
110
|
|
|
111
|
-
tmp_dir = "
|
|
111
|
+
tmp_dir = "./.tmp/nat-pull"
|
|
112
112
|
|
|
113
113
|
try:
|
|
114
114
|
async with httpx.AsyncClient(headers=self._headers, timeout=self._timeout) as client:
|
|
@@ -165,7 +165,7 @@ class RestRegistryHandler(AbstractRegistryHandler):
|
|
|
165
165
|
|
|
166
166
|
@asynccontextmanager
|
|
167
167
|
async def search(self, query: SearchQuery) -> AsyncGenerator[SearchResponse]:
|
|
168
|
-
"""Searches a remote REST registry for relevant
|
|
168
|
+
"""Searches a remote REST registry for relevant NAT components.
|
|
169
169
|
|
|
170
170
|
Args:
|
|
171
171
|
query (SearchQuery): Parameters of the search to be performed.
|
|
@@ -28,8 +28,8 @@ class WheelData(BaseModel):
|
|
|
28
28
|
package_name (str): The name of the python package.
|
|
29
29
|
toml_project (dict): A dictionary containing data about the python project.
|
|
30
30
|
toml_dependencies (set): The list of dependencies provided in the pyproject.toml file.
|
|
31
|
-
|
|
32
|
-
union_dependencies (set): The union of toml_dependencies and
|
|
31
|
+
toml_nat_packages (set): The NAT plugins listed in the pyproject.toml.
|
|
32
|
+
union_dependencies (set): The union of toml_dependencies and toml_nat_packages.
|
|
33
33
|
whl_path (str): The path to the package wheel file.
|
|
34
34
|
whl_base64 (str): Base64 encoded string of the wheel file.
|
|
35
35
|
whl_version (str): The version representing the wheel file.
|
|
@@ -39,7 +39,7 @@ class WheelData(BaseModel):
|
|
|
39
39
|
package_name: str
|
|
40
40
|
toml_project: dict
|
|
41
41
|
toml_dependencies: set
|
|
42
|
-
|
|
42
|
+
toml_nat_packages: set
|
|
43
43
|
union_dependencies: set
|
|
44
44
|
whl_path: str
|
|
45
45
|
whl_base64: str
|