azure-ai-evaluation 1.0.1__py3-none-any.whl → 1.13.5__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.
Potentially problematic release.
This version of azure-ai-evaluation might be problematic. Click here for more details.
- azure/ai/evaluation/__init__.py +85 -14
- azure/ai/evaluation/_aoai/__init__.py +10 -0
- azure/ai/evaluation/_aoai/aoai_grader.py +140 -0
- azure/ai/evaluation/_aoai/label_grader.py +68 -0
- azure/ai/evaluation/_aoai/python_grader.py +86 -0
- azure/ai/evaluation/_aoai/score_model_grader.py +94 -0
- azure/ai/evaluation/_aoai/string_check_grader.py +66 -0
- azure/ai/evaluation/_aoai/text_similarity_grader.py +80 -0
- azure/ai/evaluation/_azure/__init__.py +3 -0
- azure/ai/evaluation/_azure/_clients.py +204 -0
- azure/ai/evaluation/_azure/_envs.py +207 -0
- azure/ai/evaluation/_azure/_models.py +227 -0
- azure/ai/evaluation/_azure/_token_manager.py +129 -0
- azure/ai/evaluation/_common/__init__.py +9 -1
- azure/ai/evaluation/_common/constants.py +124 -2
- azure/ai/evaluation/_common/evaluation_onedp_client.py +169 -0
- azure/ai/evaluation/_common/onedp/__init__.py +32 -0
- azure/ai/evaluation/_common/onedp/_client.py +166 -0
- azure/ai/evaluation/_common/onedp/_configuration.py +72 -0
- azure/ai/evaluation/_common/onedp/_model_base.py +1232 -0
- azure/ai/evaluation/_common/onedp/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/_serialization.py +2032 -0
- azure/ai/evaluation/_common/onedp/_types.py +21 -0
- azure/ai/evaluation/_common/onedp/_utils/__init__.py +6 -0
- azure/ai/evaluation/_common/onedp/_utils/model_base.py +1232 -0
- azure/ai/evaluation/_common/onedp/_utils/serialization.py +2032 -0
- azure/ai/evaluation/_common/onedp/_validation.py +66 -0
- azure/ai/evaluation/_common/onedp/_vendor.py +50 -0
- azure/ai/evaluation/_common/onedp/_version.py +9 -0
- azure/ai/evaluation/_common/onedp/aio/__init__.py +29 -0
- azure/ai/evaluation/_common/onedp/aio/_client.py +168 -0
- azure/ai/evaluation/_common/onedp/aio/_configuration.py +72 -0
- azure/ai/evaluation/_common/onedp/aio/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/aio/operations/__init__.py +49 -0
- azure/ai/evaluation/_common/onedp/aio/operations/_operations.py +7143 -0
- azure/ai/evaluation/_common/onedp/aio/operations/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/models/__init__.py +358 -0
- azure/ai/evaluation/_common/onedp/models/_enums.py +447 -0
- azure/ai/evaluation/_common/onedp/models/_models.py +5963 -0
- azure/ai/evaluation/_common/onedp/models/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/operations/__init__.py +49 -0
- azure/ai/evaluation/_common/onedp/operations/_operations.py +8951 -0
- azure/ai/evaluation/_common/onedp/operations/_patch.py +21 -0
- azure/ai/evaluation/_common/onedp/py.typed +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/__init__.py +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/aio/__init__.py +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/__init__.py +25 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/_operations.py +34 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/aio/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/__init__.py +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/__init__.py +1 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/__init__.py +22 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/_operations.py +29 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/aio/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/__init__.py +22 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/_operations.py +29 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/buildingblocks/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/operations/__init__.py +25 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/operations/_operations.py +34 -0
- azure/ai/evaluation/_common/onedp/servicepatterns/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/rai_service.py +578 -69
- azure/ai/evaluation/_common/raiclient/__init__.py +34 -0
- azure/ai/evaluation/_common/raiclient/_client.py +128 -0
- azure/ai/evaluation/_common/raiclient/_configuration.py +87 -0
- azure/ai/evaluation/_common/raiclient/_model_base.py +1235 -0
- azure/ai/evaluation/_common/raiclient/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/_serialization.py +2050 -0
- azure/ai/evaluation/_common/raiclient/_version.py +9 -0
- azure/ai/evaluation/_common/raiclient/aio/__init__.py +29 -0
- azure/ai/evaluation/_common/raiclient/aio/_client.py +130 -0
- azure/ai/evaluation/_common/raiclient/aio/_configuration.py +87 -0
- azure/ai/evaluation/_common/raiclient/aio/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/aio/operations/__init__.py +25 -0
- azure/ai/evaluation/_common/raiclient/aio/operations/_operations.py +981 -0
- azure/ai/evaluation/_common/raiclient/aio/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/models/__init__.py +60 -0
- azure/ai/evaluation/_common/raiclient/models/_enums.py +18 -0
- azure/ai/evaluation/_common/raiclient/models/_models.py +651 -0
- azure/ai/evaluation/_common/raiclient/models/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/operations/__init__.py +25 -0
- azure/ai/evaluation/_common/raiclient/operations/_operations.py +1238 -0
- azure/ai/evaluation/_common/raiclient/operations/_patch.py +20 -0
- azure/ai/evaluation/_common/raiclient/py.typed +1 -0
- azure/ai/evaluation/_common/utils.py +505 -27
- azure/ai/evaluation/_constants.py +147 -0
- azure/ai/evaluation/_converters/__init__.py +3 -0
- azure/ai/evaluation/_converters/_ai_services.py +899 -0
- azure/ai/evaluation/_converters/_models.py +467 -0
- azure/ai/evaluation/_converters/_sk_services.py +495 -0
- azure/ai/evaluation/_eval_mapping.py +87 -0
- azure/ai/evaluation/_evaluate/_batch_run/__init__.py +10 -2
- azure/ai/evaluation/_evaluate/_batch_run/_run_submitter_client.py +176 -0
- azure/ai/evaluation/_evaluate/_batch_run/batch_clients.py +82 -0
- azure/ai/evaluation/_evaluate/_batch_run/code_client.py +18 -12
- azure/ai/evaluation/_evaluate/_batch_run/eval_run_context.py +19 -6
- azure/ai/evaluation/_evaluate/_batch_run/proxy_client.py +47 -22
- azure/ai/evaluation/_evaluate/_batch_run/target_run_context.py +18 -2
- azure/ai/evaluation/_evaluate/_eval_run.py +32 -46
- azure/ai/evaluation/_evaluate/_evaluate.py +1809 -142
- azure/ai/evaluation/_evaluate/_evaluate_aoai.py +992 -0
- azure/ai/evaluation/_evaluate/_telemetry/__init__.py +5 -90
- azure/ai/evaluation/_evaluate/_utils.py +237 -42
- azure/ai/evaluation/_evaluator_definition.py +76 -0
- azure/ai/evaluation/_evaluators/_bleu/_bleu.py +80 -28
- azure/ai/evaluation/_evaluators/_code_vulnerability/__init__.py +5 -0
- azure/ai/evaluation/_evaluators/_code_vulnerability/_code_vulnerability.py +119 -0
- azure/ai/evaluation/_evaluators/_coherence/_coherence.py +40 -4
- azure/ai/evaluation/_evaluators/_common/__init__.py +2 -0
- azure/ai/evaluation/_evaluators/_common/_base_eval.py +430 -29
- azure/ai/evaluation/_evaluators/_common/_base_multi_eval.py +63 -0
- azure/ai/evaluation/_evaluators/_common/_base_prompty_eval.py +269 -12
- azure/ai/evaluation/_evaluators/_common/_base_rai_svc_eval.py +74 -9
- azure/ai/evaluation/_evaluators/_common/_conversation_aggregators.py +49 -0
- azure/ai/evaluation/_evaluators/_content_safety/_content_safety.py +73 -53
- azure/ai/evaluation/_evaluators/_content_safety/_hate_unfairness.py +35 -5
- azure/ai/evaluation/_evaluators/_content_safety/_self_harm.py +26 -5
- azure/ai/evaluation/_evaluators/_content_safety/_sexual.py +35 -5
- azure/ai/evaluation/_evaluators/_content_safety/_violence.py +34 -4
- azure/ai/evaluation/_evaluators/_document_retrieval/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_document_retrieval/_document_retrieval.py +442 -0
- azure/ai/evaluation/_evaluators/_eci/_eci.py +6 -3
- azure/ai/evaluation/_evaluators/_f1_score/_f1_score.py +97 -70
- azure/ai/evaluation/_evaluators/_fluency/_fluency.py +39 -3
- azure/ai/evaluation/_evaluators/_gleu/_gleu.py +80 -25
- azure/ai/evaluation/_evaluators/_groundedness/_groundedness.py +230 -20
- azure/ai/evaluation/_evaluators/_groundedness/groundedness_with_query.prompty +30 -29
- azure/ai/evaluation/_evaluators/_groundedness/groundedness_without_query.prompty +19 -14
- azure/ai/evaluation/_evaluators/_intent_resolution/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_intent_resolution/_intent_resolution.py +196 -0
- azure/ai/evaluation/_evaluators/_intent_resolution/intent_resolution.prompty +275 -0
- azure/ai/evaluation/_evaluators/_meteor/_meteor.py +89 -36
- azure/ai/evaluation/_evaluators/_protected_material/_protected_material.py +22 -4
- azure/ai/evaluation/_evaluators/_qa/_qa.py +94 -35
- azure/ai/evaluation/_evaluators/_relevance/_relevance.py +100 -4
- azure/ai/evaluation/_evaluators/_relevance/relevance.prompty +154 -56
- azure/ai/evaluation/_evaluators/_response_completeness/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_response_completeness/_response_completeness.py +202 -0
- azure/ai/evaluation/_evaluators/_response_completeness/response_completeness.prompty +84 -0
- azure/ai/evaluation/_evaluators/_retrieval/_retrieval.py +39 -3
- azure/ai/evaluation/_evaluators/_rouge/_rouge.py +166 -26
- azure/ai/evaluation/_evaluators/_service_groundedness/_service_groundedness.py +38 -7
- azure/ai/evaluation/_evaluators/_similarity/_similarity.py +81 -85
- azure/ai/evaluation/_evaluators/_task_adherence/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_task_adherence/_task_adherence.py +226 -0
- azure/ai/evaluation/_evaluators/_task_adherence/task_adherence.prompty +101 -0
- azure/ai/evaluation/_evaluators/_task_completion/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_task_completion/_task_completion.py +177 -0
- azure/ai/evaluation/_evaluators/_task_completion/task_completion.prompty +220 -0
- azure/ai/evaluation/_evaluators/_task_navigation_efficiency/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_task_navigation_efficiency/_task_navigation_efficiency.py +384 -0
- azure/ai/evaluation/_evaluators/_tool_call_accuracy/__init__.py +9 -0
- azure/ai/evaluation/_evaluators/_tool_call_accuracy/_tool_call_accuracy.py +298 -0
- azure/ai/evaluation/_evaluators/_tool_call_accuracy/tool_call_accuracy.prompty +166 -0
- azure/ai/evaluation/_evaluators/_tool_call_success/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_tool_call_success/_tool_call_success.py +306 -0
- azure/ai/evaluation/_evaluators/_tool_call_success/tool_call_success.prompty +321 -0
- azure/ai/evaluation/_evaluators/_tool_input_accuracy/__init__.py +9 -0
- azure/ai/evaluation/_evaluators/_tool_input_accuracy/_tool_input_accuracy.py +263 -0
- azure/ai/evaluation/_evaluators/_tool_input_accuracy/tool_input_accuracy.prompty +76 -0
- azure/ai/evaluation/_evaluators/_tool_output_utilization/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/_tool_output_utilization/_tool_output_utilization.py +225 -0
- azure/ai/evaluation/_evaluators/_tool_output_utilization/tool_output_utilization.prompty +221 -0
- azure/ai/evaluation/_evaluators/_tool_selection/__init__.py +9 -0
- azure/ai/evaluation/_evaluators/_tool_selection/_tool_selection.py +266 -0
- azure/ai/evaluation/_evaluators/_tool_selection/tool_selection.prompty +104 -0
- azure/ai/evaluation/_evaluators/_ungrounded_attributes/__init__.py +5 -0
- azure/ai/evaluation/_evaluators/_ungrounded_attributes/_ungrounded_attributes.py +102 -0
- azure/ai/evaluation/_evaluators/_xpia/xpia.py +20 -4
- azure/ai/evaluation/_exceptions.py +24 -1
- azure/ai/evaluation/_http_utils.py +7 -5
- azure/ai/evaluation/_legacy/__init__.py +3 -0
- azure/ai/evaluation/_legacy/_adapters/__init__.py +7 -0
- azure/ai/evaluation/_legacy/_adapters/_check.py +17 -0
- azure/ai/evaluation/_legacy/_adapters/_configuration.py +45 -0
- azure/ai/evaluation/_legacy/_adapters/_constants.py +10 -0
- azure/ai/evaluation/_legacy/_adapters/_errors.py +29 -0
- azure/ai/evaluation/_legacy/_adapters/_flows.py +28 -0
- azure/ai/evaluation/_legacy/_adapters/_service.py +16 -0
- azure/ai/evaluation/_legacy/_adapters/client.py +51 -0
- azure/ai/evaluation/_legacy/_adapters/entities.py +26 -0
- azure/ai/evaluation/_legacy/_adapters/tracing.py +28 -0
- azure/ai/evaluation/_legacy/_adapters/types.py +15 -0
- azure/ai/evaluation/_legacy/_adapters/utils.py +31 -0
- azure/ai/evaluation/_legacy/_batch_engine/__init__.py +9 -0
- azure/ai/evaluation/_legacy/_batch_engine/_config.py +48 -0
- azure/ai/evaluation/_legacy/_batch_engine/_engine.py +477 -0
- azure/ai/evaluation/_legacy/_batch_engine/_exceptions.py +88 -0
- azure/ai/evaluation/_legacy/_batch_engine/_openai_injector.py +132 -0
- azure/ai/evaluation/_legacy/_batch_engine/_result.py +107 -0
- azure/ai/evaluation/_legacy/_batch_engine/_run.py +127 -0
- azure/ai/evaluation/_legacy/_batch_engine/_run_storage.py +128 -0
- azure/ai/evaluation/_legacy/_batch_engine/_run_submitter.py +262 -0
- azure/ai/evaluation/_legacy/_batch_engine/_status.py +25 -0
- azure/ai/evaluation/_legacy/_batch_engine/_trace.py +97 -0
- azure/ai/evaluation/_legacy/_batch_engine/_utils.py +97 -0
- azure/ai/evaluation/_legacy/_batch_engine/_utils_deprecated.py +131 -0
- azure/ai/evaluation/_legacy/_common/__init__.py +3 -0
- azure/ai/evaluation/_legacy/_common/_async_token_provider.py +117 -0
- azure/ai/evaluation/_legacy/_common/_logging.py +292 -0
- azure/ai/evaluation/_legacy/_common/_thread_pool_executor_with_context.py +17 -0
- azure/ai/evaluation/_legacy/prompty/__init__.py +36 -0
- azure/ai/evaluation/_legacy/prompty/_connection.py +119 -0
- azure/ai/evaluation/_legacy/prompty/_exceptions.py +139 -0
- azure/ai/evaluation/_legacy/prompty/_prompty.py +430 -0
- azure/ai/evaluation/_legacy/prompty/_utils.py +663 -0
- azure/ai/evaluation/_legacy/prompty/_yaml_utils.py +99 -0
- azure/ai/evaluation/_model_configurations.py +26 -0
- azure/ai/evaluation/_safety_evaluation/__init__.py +3 -0
- azure/ai/evaluation/_safety_evaluation/_generated_rai_client.py +0 -0
- azure/ai/evaluation/_safety_evaluation/_safety_evaluation.py +917 -0
- azure/ai/evaluation/_user_agent.py +32 -1
- azure/ai/evaluation/_vendor/rouge_score/rouge_scorer.py +0 -4
- azure/ai/evaluation/_vendor/rouge_score/scoring.py +0 -4
- azure/ai/evaluation/_vendor/rouge_score/tokenize.py +0 -4
- azure/ai/evaluation/_version.py +2 -1
- azure/ai/evaluation/red_team/__init__.py +22 -0
- azure/ai/evaluation/red_team/_agent/__init__.py +3 -0
- azure/ai/evaluation/red_team/_agent/_agent_functions.py +261 -0
- azure/ai/evaluation/red_team/_agent/_agent_tools.py +461 -0
- azure/ai/evaluation/red_team/_agent/_agent_utils.py +89 -0
- azure/ai/evaluation/red_team/_agent/_semantic_kernel_plugin.py +228 -0
- azure/ai/evaluation/red_team/_attack_objective_generator.py +268 -0
- azure/ai/evaluation/red_team/_attack_strategy.py +49 -0
- azure/ai/evaluation/red_team/_callback_chat_target.py +115 -0
- azure/ai/evaluation/red_team/_default_converter.py +21 -0
- azure/ai/evaluation/red_team/_evaluation_processor.py +505 -0
- azure/ai/evaluation/red_team/_mlflow_integration.py +430 -0
- azure/ai/evaluation/red_team/_orchestrator_manager.py +803 -0
- azure/ai/evaluation/red_team/_red_team.py +1717 -0
- azure/ai/evaluation/red_team/_red_team_result.py +661 -0
- azure/ai/evaluation/red_team/_result_processor.py +1708 -0
- azure/ai/evaluation/red_team/_utils/__init__.py +37 -0
- azure/ai/evaluation/red_team/_utils/_rai_service_eval_chat_target.py +128 -0
- azure/ai/evaluation/red_team/_utils/_rai_service_target.py +601 -0
- azure/ai/evaluation/red_team/_utils/_rai_service_true_false_scorer.py +114 -0
- azure/ai/evaluation/red_team/_utils/constants.py +72 -0
- azure/ai/evaluation/red_team/_utils/exception_utils.py +345 -0
- azure/ai/evaluation/red_team/_utils/file_utils.py +266 -0
- azure/ai/evaluation/red_team/_utils/formatting_utils.py +365 -0
- azure/ai/evaluation/red_team/_utils/logging_utils.py +139 -0
- azure/ai/evaluation/red_team/_utils/metric_mapping.py +73 -0
- azure/ai/evaluation/red_team/_utils/objective_utils.py +46 -0
- azure/ai/evaluation/red_team/_utils/progress_utils.py +252 -0
- azure/ai/evaluation/red_team/_utils/retry_utils.py +218 -0
- azure/ai/evaluation/red_team/_utils/strategy_utils.py +218 -0
- azure/ai/evaluation/simulator/_adversarial_scenario.py +6 -0
- azure/ai/evaluation/simulator/_adversarial_simulator.py +187 -80
- azure/ai/evaluation/simulator/_constants.py +1 -0
- azure/ai/evaluation/simulator/_conversation/__init__.py +138 -11
- azure/ai/evaluation/simulator/_conversation/_conversation.py +6 -2
- azure/ai/evaluation/simulator/_conversation/constants.py +1 -1
- azure/ai/evaluation/simulator/_direct_attack_simulator.py +37 -24
- azure/ai/evaluation/simulator/_helpers/_language_suffix_mapping.py +1 -0
- azure/ai/evaluation/simulator/_indirect_attack_simulator.py +56 -28
- azure/ai/evaluation/simulator/_model_tools/__init__.py +2 -1
- azure/ai/evaluation/simulator/_model_tools/_generated_rai_client.py +225 -0
- azure/ai/evaluation/simulator/_model_tools/_identity_manager.py +12 -10
- azure/ai/evaluation/simulator/_model_tools/_proxy_completion_model.py +100 -45
- azure/ai/evaluation/simulator/_model_tools/_rai_client.py +101 -3
- azure/ai/evaluation/simulator/_model_tools/_template_handler.py +31 -11
- azure/ai/evaluation/simulator/_model_tools/models.py +20 -17
- azure/ai/evaluation/simulator/_simulator.py +43 -19
- {azure_ai_evaluation-1.0.1.dist-info → azure_ai_evaluation-1.13.5.dist-info}/METADATA +378 -27
- azure_ai_evaluation-1.13.5.dist-info/RECORD +305 -0
- {azure_ai_evaluation-1.0.1.dist-info → azure_ai_evaluation-1.13.5.dist-info}/WHEEL +1 -1
- azure/ai/evaluation/_evaluators/_multimodal/__init__.py +0 -20
- azure/ai/evaluation/_evaluators/_multimodal/_content_safety_multimodal.py +0 -132
- azure/ai/evaluation/_evaluators/_multimodal/_content_safety_multimodal_base.py +0 -55
- azure/ai/evaluation/_evaluators/_multimodal/_hate_unfairness.py +0 -100
- azure/ai/evaluation/_evaluators/_multimodal/_protected_material.py +0 -124
- azure/ai/evaluation/_evaluators/_multimodal/_self_harm.py +0 -100
- azure/ai/evaluation/_evaluators/_multimodal/_sexual.py +0 -100
- azure/ai/evaluation/_evaluators/_multimodal/_violence.py +0 -100
- azure/ai/evaluation/simulator/_tracing.py +0 -89
- azure_ai_evaluation-1.0.1.dist-info/RECORD +0 -119
- {azure_ai_evaluation-1.0.1.dist-info → azure_ai_evaluation-1.13.5.dist-info/licenses}/NOTICE.txt +0 -0
- {azure_ai_evaluation-1.0.1.dist-info → azure_ai_evaluation-1.13.5.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# --------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
# Code generated by Microsoft (R) Python Code Generator.
|
|
5
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
6
|
+
# --------------------------------------------------------------------------
|
|
7
|
+
import functools
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def api_version_validation(**kwargs):
|
|
11
|
+
params_added_on = kwargs.pop("params_added_on", {})
|
|
12
|
+
method_added_on = kwargs.pop("method_added_on", "")
|
|
13
|
+
api_versions_list = kwargs.pop("api_versions_list", [])
|
|
14
|
+
|
|
15
|
+
def _index_with_default(value: str, default: int = -1) -> int:
|
|
16
|
+
"""Get the index of value in lst, or return default if not found.
|
|
17
|
+
|
|
18
|
+
:param value: The value to search for in the api_versions_list.
|
|
19
|
+
:type value: str
|
|
20
|
+
:param default: The default value to return if the value is not found.
|
|
21
|
+
:type default: int
|
|
22
|
+
:return: The index of the value in the list, or the default value if not found.
|
|
23
|
+
:rtype: int
|
|
24
|
+
"""
|
|
25
|
+
try:
|
|
26
|
+
return api_versions_list.index(value)
|
|
27
|
+
except ValueError:
|
|
28
|
+
return default
|
|
29
|
+
|
|
30
|
+
def decorator(func):
|
|
31
|
+
@functools.wraps(func)
|
|
32
|
+
def wrapper(*args, **kwargs):
|
|
33
|
+
try:
|
|
34
|
+
# this assumes the client has an _api_version attribute
|
|
35
|
+
client = args[0]
|
|
36
|
+
client_api_version = client._config.api_version # pylint: disable=protected-access
|
|
37
|
+
except AttributeError:
|
|
38
|
+
return func(*args, **kwargs)
|
|
39
|
+
|
|
40
|
+
if _index_with_default(method_added_on) > _index_with_default(client_api_version):
|
|
41
|
+
raise ValueError(
|
|
42
|
+
f"'{func.__name__}' is not available in API version "
|
|
43
|
+
f"{client_api_version}. Pass service API version {method_added_on} or newer to your client."
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
unsupported = {
|
|
47
|
+
parameter: api_version
|
|
48
|
+
for api_version, parameters in params_added_on.items()
|
|
49
|
+
for parameter in parameters
|
|
50
|
+
if parameter in kwargs and _index_with_default(api_version) > _index_with_default(client_api_version)
|
|
51
|
+
}
|
|
52
|
+
if unsupported:
|
|
53
|
+
raise ValueError(
|
|
54
|
+
"".join(
|
|
55
|
+
[
|
|
56
|
+
f"'{param}' is not available in API version {client_api_version}. "
|
|
57
|
+
f"Use service API version {version} or newer.\n"
|
|
58
|
+
for param, version in unsupported.items()
|
|
59
|
+
]
|
|
60
|
+
)
|
|
61
|
+
)
|
|
62
|
+
return func(*args, **kwargs)
|
|
63
|
+
|
|
64
|
+
return wrapper
|
|
65
|
+
|
|
66
|
+
return decorator
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# --------------------------------------------------------------------------
|
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
# Code generated by Microsoft (R) Python Code Generator.
|
|
5
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
6
|
+
# --------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
import json
|
|
9
|
+
from typing import Any, Dict, IO, List, Mapping, Optional, Tuple, Union
|
|
10
|
+
|
|
11
|
+
from ._model_base import Model, SdkJSONEncoder
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# file-like tuple could be `(filename, IO (or bytes))` or `(filename, IO (or bytes), content_type)`
|
|
15
|
+
FileContent = Union[str, bytes, IO[str], IO[bytes]]
|
|
16
|
+
|
|
17
|
+
FileType = Union[
|
|
18
|
+
# file (or bytes)
|
|
19
|
+
FileContent,
|
|
20
|
+
# (filename, file (or bytes))
|
|
21
|
+
Tuple[Optional[str], FileContent],
|
|
22
|
+
# (filename, file (or bytes), content_type)
|
|
23
|
+
Tuple[Optional[str], FileContent, Optional[str]],
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def serialize_multipart_data_entry(data_entry: Any) -> Any:
|
|
28
|
+
if isinstance(data_entry, (list, tuple, dict, Model)):
|
|
29
|
+
return json.dumps(data_entry, cls=SdkJSONEncoder, exclude_readonly=True)
|
|
30
|
+
return data_entry
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def prepare_multipart_form_data(
|
|
34
|
+
body: Mapping[str, Any], multipart_fields: List[str], data_fields: List[str]
|
|
35
|
+
) -> Tuple[List[FileType], Dict[str, Any]]:
|
|
36
|
+
files: List[FileType] = []
|
|
37
|
+
data: Dict[str, Any] = {}
|
|
38
|
+
for multipart_field in multipart_fields:
|
|
39
|
+
multipart_entry = body.get(multipart_field)
|
|
40
|
+
if isinstance(multipart_entry, list):
|
|
41
|
+
files.extend([(multipart_field, e) for e in multipart_entry])
|
|
42
|
+
elif multipart_entry:
|
|
43
|
+
files.append((multipart_field, multipart_entry))
|
|
44
|
+
|
|
45
|
+
for data_field in data_fields:
|
|
46
|
+
data_entry = body.get(data_field)
|
|
47
|
+
if data_entry:
|
|
48
|
+
data[data_field] = serialize_multipart_data_entry(data_entry)
|
|
49
|
+
|
|
50
|
+
return files, data
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# --------------------------------------------------------------------------
|
|
3
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
# Code generated by Microsoft (R) Python Code Generator.
|
|
6
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
# --------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
VERSION = "1.0.0b1"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# --------------------------------------------------------------------------
|
|
3
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
# Code generated by Microsoft (R) Python Code Generator.
|
|
6
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
# --------------------------------------------------------------------------
|
|
8
|
+
# pylint: disable=wrong-import-position
|
|
9
|
+
|
|
10
|
+
from typing import TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ._patch import * # pylint: disable=unused-wildcard-import
|
|
14
|
+
|
|
15
|
+
from ._client import ProjectsClient # type: ignore
|
|
16
|
+
|
|
17
|
+
try:
|
|
18
|
+
from ._patch import __all__ as _patch_all
|
|
19
|
+
from ._patch import *
|
|
20
|
+
except ImportError:
|
|
21
|
+
_patch_all = []
|
|
22
|
+
from ._patch import patch_sdk as _patch_sdk
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
"ProjectsClient",
|
|
26
|
+
]
|
|
27
|
+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
|
28
|
+
|
|
29
|
+
_patch_sdk()
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# --------------------------------------------------------------------------
|
|
3
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
# Code generated by Microsoft (R) Python Code Generator.
|
|
6
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
# --------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
from copy import deepcopy
|
|
10
|
+
from typing import Any, Awaitable, TYPE_CHECKING
|
|
11
|
+
from typing_extensions import Self
|
|
12
|
+
|
|
13
|
+
from azure.core import AsyncPipelineClient
|
|
14
|
+
from azure.core.pipeline import policies
|
|
15
|
+
from azure.core.rest import AsyncHttpResponse, HttpRequest
|
|
16
|
+
|
|
17
|
+
from .._utils.serialization import Deserializer, Serializer
|
|
18
|
+
from ._configuration import ProjectsClientConfiguration
|
|
19
|
+
from .operations import (
|
|
20
|
+
ConnectionsOperations,
|
|
21
|
+
DatasetsOperations,
|
|
22
|
+
DeploymentsOperations,
|
|
23
|
+
EvaluationResultsOperations,
|
|
24
|
+
EvaluationRulesOperations,
|
|
25
|
+
EvaluationTaxonomiesOperations,
|
|
26
|
+
EvaluationsOperations,
|
|
27
|
+
EvaluatorsOperations,
|
|
28
|
+
IndexesOperations,
|
|
29
|
+
InsightsOperations,
|
|
30
|
+
RedTeamsOperations,
|
|
31
|
+
SchedulesOperations,
|
|
32
|
+
SyncEvalsOperations,
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
if TYPE_CHECKING:
|
|
36
|
+
from azure.core.credentials_async import AsyncTokenCredential
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class ProjectsClient: # pylint: disable=too-many-instance-attributes
|
|
40
|
+
"""ProjectsClient.
|
|
41
|
+
|
|
42
|
+
:ivar connections: ConnectionsOperations operations
|
|
43
|
+
:vartype connections: azure.ai.projects.aio.operations.ConnectionsOperations
|
|
44
|
+
:ivar sync_evals: SyncEvalsOperations operations
|
|
45
|
+
:vartype sync_evals: azure.ai.projects.aio.operations.SyncEvalsOperations
|
|
46
|
+
:ivar evaluations: EvaluationsOperations operations
|
|
47
|
+
:vartype evaluations: azure.ai.projects.aio.operations.EvaluationsOperations
|
|
48
|
+
:ivar evaluators: EvaluatorsOperations operations
|
|
49
|
+
:vartype evaluators: azure.ai.projects.aio.operations.EvaluatorsOperations
|
|
50
|
+
:ivar datasets: DatasetsOperations operations
|
|
51
|
+
:vartype datasets: azure.ai.projects.aio.operations.DatasetsOperations
|
|
52
|
+
:ivar indexes: IndexesOperations operations
|
|
53
|
+
:vartype indexes: azure.ai.projects.aio.operations.IndexesOperations
|
|
54
|
+
:ivar insights: InsightsOperations operations
|
|
55
|
+
:vartype insights: azure.ai.projects.aio.operations.InsightsOperations
|
|
56
|
+
:ivar deployments: DeploymentsOperations operations
|
|
57
|
+
:vartype deployments: azure.ai.projects.aio.operations.DeploymentsOperations
|
|
58
|
+
:ivar red_teams: RedTeamsOperations operations
|
|
59
|
+
:vartype red_teams: azure.ai.projects.aio.operations.RedTeamsOperations
|
|
60
|
+
:ivar evaluation_taxonomies: EvaluationTaxonomiesOperations operations
|
|
61
|
+
:vartype evaluation_taxonomies: azure.ai.projects.aio.operations.EvaluationTaxonomiesOperations
|
|
62
|
+
:ivar schedules: SchedulesOperations operations
|
|
63
|
+
:vartype schedules: azure.ai.projects.aio.operations.SchedulesOperations
|
|
64
|
+
:ivar evaluation_results: EvaluationResultsOperations operations
|
|
65
|
+
:vartype evaluation_results: azure.ai.projects.aio.operations.EvaluationResultsOperations
|
|
66
|
+
:ivar evaluation_rules: EvaluationRulesOperations operations
|
|
67
|
+
:vartype evaluation_rules: azure.ai.projects.aio.operations.EvaluationRulesOperations
|
|
68
|
+
:param endpoint: Project endpoint. In the form
|
|
69
|
+
"`https://your-ai-services-account-name.services.ai.azure.com/api/projects/_project
|
|
70
|
+
<https://your-ai-services-account-name.services.ai.azure.com/api/projects/_project>`_"
|
|
71
|
+
if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the
|
|
72
|
+
form
|
|
73
|
+
"`https://your-ai-services-account-name.services.ai.azure.com/api/projects/your-project-name
|
|
74
|
+
<https://your-ai-services-account-name.services.ai.azure.com/api/projects/your-project-name>`_"
|
|
75
|
+
if you want to explicitly
|
|
76
|
+
specify the Foundry Project name. Required.
|
|
77
|
+
:type endpoint: str
|
|
78
|
+
:param credential: Credential used to authenticate requests to the service. Required.
|
|
79
|
+
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
|
|
80
|
+
:keyword api_version: The API version to use for this operation. Default value is
|
|
81
|
+
"2025-11-15-preview". Note that overriding this default value may result in unsupported
|
|
82
|
+
behavior.
|
|
83
|
+
:paramtype api_version: str
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None:
|
|
87
|
+
_endpoint = "{endpoint}"
|
|
88
|
+
self._config = ProjectsClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)
|
|
89
|
+
|
|
90
|
+
_policies = kwargs.pop("policies", None)
|
|
91
|
+
if _policies is None:
|
|
92
|
+
_policies = [
|
|
93
|
+
policies.RequestIdPolicy(**kwargs),
|
|
94
|
+
self._config.headers_policy,
|
|
95
|
+
self._config.user_agent_policy,
|
|
96
|
+
self._config.proxy_policy,
|
|
97
|
+
policies.ContentDecodePolicy(**kwargs),
|
|
98
|
+
self._config.redirect_policy,
|
|
99
|
+
self._config.retry_policy,
|
|
100
|
+
self._config.authentication_policy,
|
|
101
|
+
self._config.custom_hook_policy,
|
|
102
|
+
self._config.logging_policy,
|
|
103
|
+
policies.DistributedTracingPolicy(**kwargs),
|
|
104
|
+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
|
|
105
|
+
self._config.http_logging_policy,
|
|
106
|
+
]
|
|
107
|
+
self._client: AsyncPipelineClient = AsyncPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
|
|
108
|
+
|
|
109
|
+
self._serialize = Serializer()
|
|
110
|
+
self._deserialize = Deserializer()
|
|
111
|
+
self._serialize.client_side_validation = False
|
|
112
|
+
self.connections = ConnectionsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
113
|
+
self.sync_evals = SyncEvalsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
114
|
+
self.evaluations = EvaluationsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
115
|
+
self.evaluators = EvaluatorsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
116
|
+
self.datasets = DatasetsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
117
|
+
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
118
|
+
self.insights = InsightsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
119
|
+
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
120
|
+
self.red_teams = RedTeamsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
121
|
+
self.evaluation_taxonomies = EvaluationTaxonomiesOperations(
|
|
122
|
+
self._client, self._config, self._serialize, self._deserialize
|
|
123
|
+
)
|
|
124
|
+
self.schedules = SchedulesOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
125
|
+
self.evaluation_results = EvaluationResultsOperations(
|
|
126
|
+
self._client, self._config, self._serialize, self._deserialize
|
|
127
|
+
)
|
|
128
|
+
self.evaluation_rules = EvaluationRulesOperations(
|
|
129
|
+
self._client, self._config, self._serialize, self._deserialize
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
def send_request(
|
|
133
|
+
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
|
|
134
|
+
) -> Awaitable[AsyncHttpResponse]:
|
|
135
|
+
"""Runs the network request through the client's chained policies.
|
|
136
|
+
|
|
137
|
+
>>> from azure.core.rest import HttpRequest
|
|
138
|
+
>>> request = HttpRequest("GET", "https://www.example.org/")
|
|
139
|
+
<HttpRequest [GET], url: 'https://www.example.org/'>
|
|
140
|
+
>>> response = await client.send_request(request)
|
|
141
|
+
<AsyncHttpResponse: 200 OK>
|
|
142
|
+
|
|
143
|
+
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
|
|
144
|
+
|
|
145
|
+
:param request: The network request you want to make. Required.
|
|
146
|
+
:type request: ~azure.core.rest.HttpRequest
|
|
147
|
+
:keyword bool stream: Whether the response payload will be streamed. Defaults to False.
|
|
148
|
+
:return: The response of your network call. Does not do error handling on your response.
|
|
149
|
+
:rtype: ~azure.core.rest.AsyncHttpResponse
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
request_copy = deepcopy(request)
|
|
153
|
+
path_format_arguments = {
|
|
154
|
+
"endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True),
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
|
|
158
|
+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
|
|
159
|
+
|
|
160
|
+
async def close(self) -> None:
|
|
161
|
+
await self._client.close()
|
|
162
|
+
|
|
163
|
+
async def __aenter__(self) -> Self:
|
|
164
|
+
await self._client.__aenter__()
|
|
165
|
+
return self
|
|
166
|
+
|
|
167
|
+
async def __aexit__(self, *exc_details: Any) -> None:
|
|
168
|
+
await self._client.__aexit__(*exc_details)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# --------------------------------------------------------------------------
|
|
3
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
# Code generated by Microsoft (R) Python Code Generator.
|
|
6
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
# --------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
from typing import Any, TYPE_CHECKING
|
|
10
|
+
|
|
11
|
+
from azure.core.pipeline import policies
|
|
12
|
+
|
|
13
|
+
from .._version import VERSION
|
|
14
|
+
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from azure.core.credentials_async import AsyncTokenCredential
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ProjectsClientConfiguration: # pylint: disable=too-many-instance-attributes
|
|
20
|
+
"""Configuration for ProjectsClient.
|
|
21
|
+
|
|
22
|
+
Note that all parameters used to create this instance are saved as instance
|
|
23
|
+
attributes.
|
|
24
|
+
|
|
25
|
+
:param endpoint: Project endpoint. In the form
|
|
26
|
+
"`https://your-ai-services-account-name.services.ai.azure.com/api/projects/_project
|
|
27
|
+
<https://your-ai-services-account-name.services.ai.azure.com/api/projects/_project>`_"
|
|
28
|
+
if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the
|
|
29
|
+
form
|
|
30
|
+
"`https://your-ai-services-account-name.services.ai.azure.com/api/projects/your-project-name
|
|
31
|
+
<https://your-ai-services-account-name.services.ai.azure.com/api/projects/your-project-name>`_"
|
|
32
|
+
if you want to explicitly
|
|
33
|
+
specify the Foundry Project name. Required.
|
|
34
|
+
:type endpoint: str
|
|
35
|
+
:param credential: Credential used to authenticate requests to the service. Required.
|
|
36
|
+
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
|
|
37
|
+
:keyword api_version: The API version to use for this operation. Default value is
|
|
38
|
+
"2025-11-15-preview". Note that overriding this default value may result in unsupported
|
|
39
|
+
behavior.
|
|
40
|
+
:paramtype api_version: str
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None:
|
|
44
|
+
api_version: str = kwargs.pop("api_version", "2025-11-15-preview")
|
|
45
|
+
|
|
46
|
+
if endpoint is None:
|
|
47
|
+
raise ValueError("Parameter 'endpoint' must not be None.")
|
|
48
|
+
if credential is None:
|
|
49
|
+
raise ValueError("Parameter 'credential' must not be None.")
|
|
50
|
+
|
|
51
|
+
self.endpoint = endpoint
|
|
52
|
+
self.credential = credential
|
|
53
|
+
self.api_version = api_version
|
|
54
|
+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://ai.azure.com/.default"])
|
|
55
|
+
kwargs.setdefault("sdk_moniker", "ai-projects/{}".format(VERSION))
|
|
56
|
+
self.polling_interval = kwargs.get("polling_interval", 30)
|
|
57
|
+
self._configure(**kwargs)
|
|
58
|
+
|
|
59
|
+
def _configure(self, **kwargs: Any) -> None:
|
|
60
|
+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
|
|
61
|
+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
|
|
62
|
+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
|
|
63
|
+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
|
|
64
|
+
self.http_logging_policy = kwargs.get("http_logging_policy") or policies.HttpLoggingPolicy(**kwargs)
|
|
65
|
+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
|
|
66
|
+
self.redirect_policy = kwargs.get("redirect_policy") or policies.AsyncRedirectPolicy(**kwargs)
|
|
67
|
+
self.retry_policy = kwargs.get("retry_policy") or policies.AsyncRetryPolicy(**kwargs)
|
|
68
|
+
self.authentication_policy = kwargs.get("authentication_policy")
|
|
69
|
+
if self.credential and not self.authentication_policy:
|
|
70
|
+
self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(
|
|
71
|
+
self.credential, *self.credential_scopes, **kwargs
|
|
72
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# --------------------------------------------------------------------------
|
|
3
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
# --------------------------------------------------------------------------
|
|
6
|
+
"""Customize generated code here.
|
|
7
|
+
|
|
8
|
+
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
|
|
9
|
+
"""
|
|
10
|
+
from typing import List
|
|
11
|
+
|
|
12
|
+
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def patch_sdk():
|
|
16
|
+
"""Do not remove from this file.
|
|
17
|
+
|
|
18
|
+
`patch_sdk` is a last resort escape hatch that allows you to do customizations
|
|
19
|
+
you can't accomplish using the techniques described in
|
|
20
|
+
https://aka.ms/azsdk/python/dpcodegen/python/customize
|
|
21
|
+
"""
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# --------------------------------------------------------------------------
|
|
3
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
# Code generated by Microsoft (R) Python Code Generator.
|
|
6
|
+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
# --------------------------------------------------------------------------
|
|
8
|
+
# pylint: disable=wrong-import-position
|
|
9
|
+
|
|
10
|
+
from typing import TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ._patch import * # pylint: disable=unused-wildcard-import
|
|
14
|
+
|
|
15
|
+
from ._operations import ConnectionsOperations # type: ignore
|
|
16
|
+
from ._operations import SyncEvalsOperations # type: ignore
|
|
17
|
+
from ._operations import EvaluationsOperations # type: ignore
|
|
18
|
+
from ._operations import EvaluatorsOperations # type: ignore
|
|
19
|
+
from ._operations import DatasetsOperations # type: ignore
|
|
20
|
+
from ._operations import IndexesOperations # type: ignore
|
|
21
|
+
from ._operations import InsightsOperations # type: ignore
|
|
22
|
+
from ._operations import DeploymentsOperations # type: ignore
|
|
23
|
+
from ._operations import RedTeamsOperations # type: ignore
|
|
24
|
+
from ._operations import EvaluationTaxonomiesOperations # type: ignore
|
|
25
|
+
from ._operations import SchedulesOperations # type: ignore
|
|
26
|
+
from ._operations import EvaluationResultsOperations # type: ignore
|
|
27
|
+
from ._operations import EvaluationRulesOperations # type: ignore
|
|
28
|
+
|
|
29
|
+
from ._patch import __all__ as _patch_all
|
|
30
|
+
from ._patch import *
|
|
31
|
+
from ._patch import patch_sdk as _patch_sdk
|
|
32
|
+
|
|
33
|
+
__all__ = [
|
|
34
|
+
"ConnectionsOperations",
|
|
35
|
+
"SyncEvalsOperations",
|
|
36
|
+
"EvaluationsOperations",
|
|
37
|
+
"EvaluatorsOperations",
|
|
38
|
+
"DatasetsOperations",
|
|
39
|
+
"IndexesOperations",
|
|
40
|
+
"InsightsOperations",
|
|
41
|
+
"DeploymentsOperations",
|
|
42
|
+
"RedTeamsOperations",
|
|
43
|
+
"EvaluationTaxonomiesOperations",
|
|
44
|
+
"SchedulesOperations",
|
|
45
|
+
"EvaluationResultsOperations",
|
|
46
|
+
"EvaluationRulesOperations",
|
|
47
|
+
]
|
|
48
|
+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
|
49
|
+
_patch_sdk()
|