azure-ai-evaluation 1.12.0__py3-none-any.whl → 1.13.0__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.
- azure/ai/evaluation/__init__.py +2 -0
- azure/ai/evaluation/_aoai/aoai_grader.py +6 -9
- azure/ai/evaluation/_aoai/label_grader.py +6 -10
- azure/ai/evaluation/_aoai/python_grader.py +7 -10
- azure/ai/evaluation/_aoai/score_model_grader.py +5 -7
- azure/ai/evaluation/_aoai/string_check_grader.py +4 -9
- azure/ai/evaluation/_aoai/text_similarity_grader.py +7 -21
- azure/ai/evaluation/_common/__init__.py +2 -1
- azure/ai/evaluation/_common/constants.py +109 -0
- azure/ai/evaluation/_common/evaluation_onedp_client.py +5 -5
- azure/ai/evaluation/_common/onedp/__init__.py +2 -2
- azure/ai/evaluation/_common/onedp/_client.py +44 -14
- azure/ai/evaluation/_common/onedp/_configuration.py +9 -7
- azure/ai/evaluation/_common/onedp/_utils/model_base.py +1 -1
- azure/ai/evaluation/_common/onedp/_validation.py +18 -2
- azure/ai/evaluation/_common/onedp/aio/__init__.py +2 -2
- azure/ai/evaluation/_common/onedp/aio/_client.py +44 -14
- azure/ai/evaluation/_common/onedp/aio/_configuration.py +9 -7
- azure/ai/evaluation/_common/onedp/aio/operations/__init__.py +12 -0
- azure/ai/evaluation/_common/onedp/aio/operations/_operations.py +3942 -1631
- azure/ai/evaluation/_common/onedp/models/__init__.py +196 -6
- azure/ai/evaluation/_common/onedp/models/_enums.py +217 -0
- azure/ai/evaluation/_common/onedp/models/_models.py +3876 -603
- azure/ai/evaluation/_common/onedp/operations/__init__.py +12 -0
- azure/ai/evaluation/_common/onedp/operations/_operations.py +5422 -2577
- azure/ai/evaluation/_common/rai_service.py +299 -2
- azure/ai/evaluation/_common/utils.py +241 -39
- azure/ai/evaluation/_constants.py +100 -0
- azure/ai/evaluation/_eval_mapping.py +10 -2
- azure/ai/evaluation/_evaluate/_batch_run/_run_submitter_client.py +10 -0
- azure/ai/evaluation/_evaluate/_evaluate.py +1019 -5
- azure/ai/evaluation/_evaluate/_evaluate_aoai.py +86 -11
- azure/ai/evaluation/_evaluate/_utils.py +10 -3
- azure/ai/evaluation/_evaluator_definition.py +76 -0
- azure/ai/evaluation/_evaluators/_bleu/_bleu.py +1 -0
- azure/ai/evaluation/_evaluators/_code_vulnerability/_code_vulnerability.py +0 -17
- azure/ai/evaluation/_evaluators/_common/_base_eval.py +16 -4
- azure/ai/evaluation/_evaluators/_common/_base_prompty_eval.py +181 -3
- azure/ai/evaluation/_evaluators/_groundedness/_groundedness.py +107 -45
- 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/_intent_resolution.py +23 -4
- azure/ai/evaluation/_evaluators/_relevance/_relevance.py +14 -6
- azure/ai/evaluation/_evaluators/_relevance/relevance.prompty +36 -19
- azure/ai/evaluation/_evaluators/_response_completeness/_response_completeness.py +43 -20
- azure/ai/evaluation/_evaluators/_task_adherence/_task_adherence.py +32 -6
- azure/ai/evaluation/_evaluators/{_path_efficiency → _task_completion}/__init__.py +2 -2
- azure/ai/evaluation/_evaluators/{_task_success/_task_success.py → _task_completion/_task_completion.py} +39 -30
- azure/ai/evaluation/_evaluators/{_task_success/task_success.prompty → _task_completion/task_completion.prompty} +2 -2
- azure/ai/evaluation/_evaluators/_task_navigation_efficiency/__init__.py +7 -0
- azure/ai/evaluation/_evaluators/{_path_efficiency/_path_efficiency.py → _task_navigation_efficiency/_task_navigation_efficiency.py} +115 -73
- azure/ai/evaluation/_evaluators/_tool_call_accuracy/_tool_call_accuracy.py +23 -127
- 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/{_task_success → _tool_success}/__init__.py +2 -2
- azure/ai/evaluation/_evaluators/_tool_success/_tool_success.py +301 -0
- azure/ai/evaluation/_evaluators/_tool_success/tool_success.prompty +321 -0
- azure/ai/evaluation/_evaluators/_ungrounded_attributes/_ungrounded_attributes.py +0 -19
- azure/ai/evaluation/_exceptions.py +6 -1
- azure/ai/evaluation/_legacy/_batch_engine/_run_submitter.py +14 -1
- azure/ai/evaluation/_legacy/prompty/_prompty.py +2 -1
- azure/ai/evaluation/_legacy/prompty/_utils.py +54 -6
- azure/ai/evaluation/_model_configurations.py +26 -0
- azure/ai/evaluation/_version.py +1 -1
- azure/ai/evaluation/red_team/_attack_objective_generator.py +3 -1
- azure/ai/evaluation/red_team/_attack_strategy.py +1 -0
- azure/ai/evaluation/red_team/_callback_chat_target.py +45 -14
- azure/ai/evaluation/red_team/_evaluation_processor.py +129 -12
- azure/ai/evaluation/red_team/_mlflow_integration.py +41 -352
- azure/ai/evaluation/red_team/_orchestrator_manager.py +309 -51
- azure/ai/evaluation/red_team/_red_team.py +494 -37
- azure/ai/evaluation/red_team/_red_team_result.py +48 -28
- azure/ai/evaluation/red_team/_result_processor.py +558 -29
- azure/ai/evaluation/red_team/_utils/constants.py +1 -0
- azure/ai/evaluation/red_team/_utils/formatting_utils.py +125 -24
- azure/ai/evaluation/red_team/_utils/metric_mapping.py +10 -7
- azure/ai/evaluation/red_team/_utils/strategy_utils.py +3 -25
- azure/ai/evaluation/simulator/_adversarial_simulator.py +1 -1
- azure/ai/evaluation/simulator/_conversation/__init__.py +1 -1
- azure/ai/evaluation/simulator/_conversation/_conversation.py +1 -1
- azure/ai/evaluation/simulator/_direct_attack_simulator.py +1 -1
- azure/ai/evaluation/simulator/_indirect_attack_simulator.py +1 -1
- azure/ai/evaluation/simulator/_model_tools/_generated_rai_client.py +25 -2
- azure/ai/evaluation/simulator/_model_tools/_identity_manager.py +1 -0
- azure/ai/evaluation/simulator/_model_tools/_proxy_completion_model.py +1 -1
- azure/ai/evaluation/simulator/_model_tools/_template_handler.py +1 -1
- azure/ai/evaluation/simulator/_model_tools/models.py +1 -1
- {azure_ai_evaluation-1.12.0.dist-info → azure_ai_evaluation-1.13.0.dist-info}/METADATA +38 -8
- {azure_ai_evaluation-1.12.0.dist-info → azure_ai_evaluation-1.13.0.dist-info}/RECORD +99 -86
- {azure_ai_evaluation-1.12.0.dist-info → azure_ai_evaluation-1.13.0.dist-info}/WHEEL +0 -0
- {azure_ai_evaluation-1.12.0.dist-info → azure_ai_evaluation-1.13.0.dist-info}/licenses/NOTICE.txt +0 -0
- {azure_ai_evaluation-1.12.0.dist-info → azure_ai_evaluation-1.13.0.dist-info}/top_level.txt +0 -0
|
@@ -16,30 +16,32 @@ if TYPE_CHECKING:
|
|
|
16
16
|
from azure.core.credentials import TokenCredential
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class
|
|
20
|
-
"""Configuration for
|
|
19
|
+
class ProjectsClientConfiguration: # pylint: disable=too-many-instance-attributes
|
|
20
|
+
"""Configuration for ProjectsClient.
|
|
21
21
|
|
|
22
22
|
Note that all parameters used to create this instance are saved as instance
|
|
23
23
|
attributes.
|
|
24
24
|
|
|
25
25
|
:param endpoint: Project endpoint. In the form
|
|
26
|
-
"https
|
|
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>`_"
|
|
27
28
|
if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the
|
|
28
29
|
form
|
|
29
|
-
"https
|
|
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>`_"
|
|
30
32
|
if you want to explicitly
|
|
31
33
|
specify the Foundry Project name. Required.
|
|
32
34
|
:type endpoint: str
|
|
33
35
|
:param credential: Credential used to authenticate requests to the service. Required.
|
|
34
36
|
:type credential: ~azure.core.credentials.TokenCredential
|
|
35
37
|
:keyword api_version: The API version to use for this operation. Default value is
|
|
36
|
-
"2025-
|
|
38
|
+
"2025-11-15-preview". Note that overriding this default value may result in unsupported
|
|
37
39
|
behavior.
|
|
38
40
|
:paramtype api_version: str
|
|
39
41
|
"""
|
|
40
42
|
|
|
41
43
|
def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None:
|
|
42
|
-
api_version: str = kwargs.pop("api_version", "2025-
|
|
44
|
+
api_version: str = kwargs.pop("api_version", "2025-11-15-preview")
|
|
43
45
|
|
|
44
46
|
if endpoint is None:
|
|
45
47
|
raise ValueError("Parameter 'endpoint' must not be None.")
|
|
@@ -50,7 +52,7 @@ class AIProjectClientConfiguration: # pylint: disable=too-many-instance-attribu
|
|
|
50
52
|
self.credential = credential
|
|
51
53
|
self.api_version = api_version
|
|
52
54
|
self.credential_scopes = kwargs.pop("credential_scopes", ["https://ai.azure.com/.default"])
|
|
53
|
-
kwargs.setdefault("sdk_moniker", "ai-projects
|
|
55
|
+
kwargs.setdefault("sdk_moniker", "ai-projects/{}".format(VERSION))
|
|
54
56
|
self.polling_interval = kwargs.get("polling_interval", 30)
|
|
55
57
|
self._configure(**kwargs)
|
|
56
58
|
|
|
@@ -10,6 +10,22 @@ import functools
|
|
|
10
10
|
def api_version_validation(**kwargs):
|
|
11
11
|
params_added_on = kwargs.pop("params_added_on", {})
|
|
12
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
|
|
13
29
|
|
|
14
30
|
def decorator(func):
|
|
15
31
|
@functools.wraps(func)
|
|
@@ -21,7 +37,7 @@ def api_version_validation(**kwargs):
|
|
|
21
37
|
except AttributeError:
|
|
22
38
|
return func(*args, **kwargs)
|
|
23
39
|
|
|
24
|
-
if method_added_on > client_api_version:
|
|
40
|
+
if _index_with_default(method_added_on) > _index_with_default(client_api_version):
|
|
25
41
|
raise ValueError(
|
|
26
42
|
f"'{func.__name__}' is not available in API version "
|
|
27
43
|
f"{client_api_version}. Pass service API version {method_added_on} or newer to your client."
|
|
@@ -31,7 +47,7 @@ def api_version_validation(**kwargs):
|
|
|
31
47
|
parameter: api_version
|
|
32
48
|
for api_version, parameters in params_added_on.items()
|
|
33
49
|
for parameter in parameters
|
|
34
|
-
if parameter in kwargs and api_version > client_api_version
|
|
50
|
+
if parameter in kwargs and _index_with_default(api_version) > _index_with_default(client_api_version)
|
|
35
51
|
}
|
|
36
52
|
if unsupported:
|
|
37
53
|
raise ValueError(
|
|
@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
13
|
from ._patch import * # pylint: disable=unused-wildcard-import
|
|
14
14
|
|
|
15
|
-
from ._client import
|
|
15
|
+
from ._client import ProjectsClient # type: ignore
|
|
16
16
|
|
|
17
17
|
try:
|
|
18
18
|
from ._patch import __all__ as _patch_all
|
|
@@ -22,7 +22,7 @@ except ImportError:
|
|
|
22
22
|
from ._patch import patch_sdk as _patch_sdk
|
|
23
23
|
|
|
24
24
|
__all__ = [
|
|
25
|
-
"
|
|
25
|
+
"ProjectsClient",
|
|
26
26
|
]
|
|
27
27
|
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
|
28
28
|
|
|
@@ -15,57 +15,77 @@ from azure.core.pipeline import policies
|
|
|
15
15
|
from azure.core.rest import AsyncHttpResponse, HttpRequest
|
|
16
16
|
|
|
17
17
|
from .._utils.serialization import Deserializer, Serializer
|
|
18
|
-
from ._configuration import
|
|
18
|
+
from ._configuration import ProjectsClientConfiguration
|
|
19
19
|
from .operations import (
|
|
20
20
|
ConnectionsOperations,
|
|
21
21
|
DatasetsOperations,
|
|
22
22
|
DeploymentsOperations,
|
|
23
23
|
EvaluationResultsOperations,
|
|
24
|
+
EvaluationRulesOperations,
|
|
25
|
+
EvaluationTaxonomiesOperations,
|
|
24
26
|
EvaluationsOperations,
|
|
27
|
+
EvaluatorsOperations,
|
|
25
28
|
IndexesOperations,
|
|
29
|
+
InsightsOperations,
|
|
26
30
|
RedTeamsOperations,
|
|
31
|
+
SchedulesOperations,
|
|
32
|
+
SyncEvalsOperations,
|
|
27
33
|
)
|
|
28
34
|
|
|
29
35
|
if TYPE_CHECKING:
|
|
30
36
|
from azure.core.credentials_async import AsyncTokenCredential
|
|
31
37
|
|
|
32
38
|
|
|
33
|
-
class
|
|
34
|
-
"""
|
|
39
|
+
class ProjectsClient: # pylint: disable=too-many-instance-attributes
|
|
40
|
+
"""ProjectsClient.
|
|
35
41
|
|
|
36
42
|
:ivar connections: ConnectionsOperations operations
|
|
37
|
-
:vartype connections: azure.ai.projects.
|
|
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
|
|
38
46
|
:ivar evaluations: EvaluationsOperations operations
|
|
39
|
-
:vartype evaluations: azure.ai.projects.
|
|
47
|
+
:vartype evaluations: azure.ai.projects.aio.operations.EvaluationsOperations
|
|
48
|
+
:ivar evaluators: EvaluatorsOperations operations
|
|
49
|
+
:vartype evaluators: azure.ai.projects.aio.operations.EvaluatorsOperations
|
|
40
50
|
:ivar datasets: DatasetsOperations operations
|
|
41
|
-
:vartype datasets: azure.ai.projects.
|
|
51
|
+
:vartype datasets: azure.ai.projects.aio.operations.DatasetsOperations
|
|
42
52
|
:ivar indexes: IndexesOperations operations
|
|
43
|
-
:vartype indexes: azure.ai.projects.
|
|
53
|
+
:vartype indexes: azure.ai.projects.aio.operations.IndexesOperations
|
|
54
|
+
:ivar insights: InsightsOperations operations
|
|
55
|
+
:vartype insights: azure.ai.projects.aio.operations.InsightsOperations
|
|
44
56
|
:ivar deployments: DeploymentsOperations operations
|
|
45
|
-
:vartype deployments: azure.ai.projects.
|
|
57
|
+
:vartype deployments: azure.ai.projects.aio.operations.DeploymentsOperations
|
|
46
58
|
:ivar red_teams: RedTeamsOperations operations
|
|
47
|
-
:vartype red_teams: azure.ai.projects.
|
|
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
|
|
48
64
|
:ivar evaluation_results: EvaluationResultsOperations operations
|
|
49
|
-
:vartype evaluation_results: azure.ai.projects.
|
|
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
|
|
50
68
|
:param endpoint: Project endpoint. In the form
|
|
51
|
-
"https
|
|
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>`_"
|
|
52
71
|
if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the
|
|
53
72
|
form
|
|
54
|
-
"https
|
|
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>`_"
|
|
55
75
|
if you want to explicitly
|
|
56
76
|
specify the Foundry Project name. Required.
|
|
57
77
|
:type endpoint: str
|
|
58
78
|
:param credential: Credential used to authenticate requests to the service. Required.
|
|
59
79
|
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
|
|
60
80
|
:keyword api_version: The API version to use for this operation. Default value is
|
|
61
|
-
"2025-
|
|
81
|
+
"2025-11-15-preview". Note that overriding this default value may result in unsupported
|
|
62
82
|
behavior.
|
|
63
83
|
:paramtype api_version: str
|
|
64
84
|
"""
|
|
65
85
|
|
|
66
86
|
def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None:
|
|
67
87
|
_endpoint = "{endpoint}"
|
|
68
|
-
self._config =
|
|
88
|
+
self._config = ProjectsClientConfiguration(endpoint=endpoint, credential=credential, **kwargs)
|
|
69
89
|
|
|
70
90
|
_policies = kwargs.pop("policies", None)
|
|
71
91
|
if _policies is None:
|
|
@@ -90,14 +110,24 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes
|
|
|
90
110
|
self._deserialize = Deserializer()
|
|
91
111
|
self._serialize.client_side_validation = False
|
|
92
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)
|
|
93
114
|
self.evaluations = EvaluationsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
115
|
+
self.evaluators = EvaluatorsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
94
116
|
self.datasets = DatasetsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
95
117
|
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
118
|
+
self.insights = InsightsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
96
119
|
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
|
|
97
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)
|
|
98
125
|
self.evaluation_results = EvaluationResultsOperations(
|
|
99
126
|
self._client, self._config, self._serialize, self._deserialize
|
|
100
127
|
)
|
|
128
|
+
self.evaluation_rules = EvaluationRulesOperations(
|
|
129
|
+
self._client, self._config, self._serialize, self._deserialize
|
|
130
|
+
)
|
|
101
131
|
|
|
102
132
|
def send_request(
|
|
103
133
|
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
|
|
@@ -16,30 +16,32 @@ if TYPE_CHECKING:
|
|
|
16
16
|
from azure.core.credentials_async import AsyncTokenCredential
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
class
|
|
20
|
-
"""Configuration for
|
|
19
|
+
class ProjectsClientConfiguration: # pylint: disable=too-many-instance-attributes
|
|
20
|
+
"""Configuration for ProjectsClient.
|
|
21
21
|
|
|
22
22
|
Note that all parameters used to create this instance are saved as instance
|
|
23
23
|
attributes.
|
|
24
24
|
|
|
25
25
|
:param endpoint: Project endpoint. In the form
|
|
26
|
-
"https
|
|
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>`_"
|
|
27
28
|
if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the
|
|
28
29
|
form
|
|
29
|
-
"https
|
|
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>`_"
|
|
30
32
|
if you want to explicitly
|
|
31
33
|
specify the Foundry Project name. Required.
|
|
32
34
|
:type endpoint: str
|
|
33
35
|
:param credential: Credential used to authenticate requests to the service. Required.
|
|
34
36
|
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
|
|
35
37
|
:keyword api_version: The API version to use for this operation. Default value is
|
|
36
|
-
"2025-
|
|
38
|
+
"2025-11-15-preview". Note that overriding this default value may result in unsupported
|
|
37
39
|
behavior.
|
|
38
40
|
:paramtype api_version: str
|
|
39
41
|
"""
|
|
40
42
|
|
|
41
43
|
def __init__(self, endpoint: str, credential: "AsyncTokenCredential", **kwargs: Any) -> None:
|
|
42
|
-
api_version: str = kwargs.pop("api_version", "2025-
|
|
44
|
+
api_version: str = kwargs.pop("api_version", "2025-11-15-preview")
|
|
43
45
|
|
|
44
46
|
if endpoint is None:
|
|
45
47
|
raise ValueError("Parameter 'endpoint' must not be None.")
|
|
@@ -50,7 +52,7 @@ class AIProjectClientConfiguration: # pylint: disable=too-many-instance-attribu
|
|
|
50
52
|
self.credential = credential
|
|
51
53
|
self.api_version = api_version
|
|
52
54
|
self.credential_scopes = kwargs.pop("credential_scopes", ["https://ai.azure.com/.default"])
|
|
53
|
-
kwargs.setdefault("sdk_moniker", "ai-projects
|
|
55
|
+
kwargs.setdefault("sdk_moniker", "ai-projects/{}".format(VERSION))
|
|
54
56
|
self.polling_interval = kwargs.get("polling_interval", 30)
|
|
55
57
|
self._configure(**kwargs)
|
|
56
58
|
|
|
@@ -13,12 +13,18 @@ if TYPE_CHECKING:
|
|
|
13
13
|
from ._patch import * # pylint: disable=unused-wildcard-import
|
|
14
14
|
|
|
15
15
|
from ._operations import ConnectionsOperations # type: ignore
|
|
16
|
+
from ._operations import SyncEvalsOperations # type: ignore
|
|
16
17
|
from ._operations import EvaluationsOperations # type: ignore
|
|
18
|
+
from ._operations import EvaluatorsOperations # type: ignore
|
|
17
19
|
from ._operations import DatasetsOperations # type: ignore
|
|
18
20
|
from ._operations import IndexesOperations # type: ignore
|
|
21
|
+
from ._operations import InsightsOperations # type: ignore
|
|
19
22
|
from ._operations import DeploymentsOperations # type: ignore
|
|
20
23
|
from ._operations import RedTeamsOperations # type: ignore
|
|
24
|
+
from ._operations import EvaluationTaxonomiesOperations # type: ignore
|
|
25
|
+
from ._operations import SchedulesOperations # type: ignore
|
|
21
26
|
from ._operations import EvaluationResultsOperations # type: ignore
|
|
27
|
+
from ._operations import EvaluationRulesOperations # type: ignore
|
|
22
28
|
|
|
23
29
|
from ._patch import __all__ as _patch_all
|
|
24
30
|
from ._patch import *
|
|
@@ -26,12 +32,18 @@ from ._patch import patch_sdk as _patch_sdk
|
|
|
26
32
|
|
|
27
33
|
__all__ = [
|
|
28
34
|
"ConnectionsOperations",
|
|
35
|
+
"SyncEvalsOperations",
|
|
29
36
|
"EvaluationsOperations",
|
|
37
|
+
"EvaluatorsOperations",
|
|
30
38
|
"DatasetsOperations",
|
|
31
39
|
"IndexesOperations",
|
|
40
|
+
"InsightsOperations",
|
|
32
41
|
"DeploymentsOperations",
|
|
33
42
|
"RedTeamsOperations",
|
|
43
|
+
"EvaluationTaxonomiesOperations",
|
|
44
|
+
"SchedulesOperations",
|
|
34
45
|
"EvaluationResultsOperations",
|
|
46
|
+
"EvaluationRulesOperations",
|
|
35
47
|
]
|
|
36
48
|
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
|
|
37
49
|
_patch_sdk()
|