Skip to content

Commit 8614f53

Browse files
authored
Another round of 1DP Python Projects SDK updates (#40444)
1 parent 7097f80 commit 8614f53

File tree

47 files changed

+1863
-3632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1863
-3632
lines changed

sdk/ai/azure-ai-projects-onedp/apiview-properties.json

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,44 @@
11
{
22
"CrossLanguagePackageId": "Azure.AI.Projects",
33
"CrossLanguageDefinitionId": {
4+
"azure.ai.projects.onedp.models.BaseCredentials": "Azure.AI.Projects.BaseCredentials",
5+
"azure.ai.projects.onedp.models.ApiKeyCredentials": "Azure.AI.Projects.ApiKeyCredentials",
46
"azure.ai.projects.onedp.models.Index": "Azure.AI.Projects.Index",
57
"azure.ai.projects.onedp.models.AzureAISearchIndex": "Azure.AI.Projects.AzureAISearchIndex",
68
"azure.ai.projects.onedp.models.BlobReferenceForConsumption": "Azure.AI.Projects.BlobReferenceForConsumption",
79
"azure.ai.projects.onedp.models.Connection": "Azure.AI.Projects.Connection",
810
"azure.ai.projects.onedp.models.CosmosDBIndex": "Azure.AI.Projects.CosmosDBIndex",
11+
"azure.ai.projects.onedp.models.CustomCredential": "Azure.AI.Projects.CustomCredential",
912
"azure.ai.projects.onedp.models.DatasetVersion": "Azure.AI.Projects.DatasetVersion",
1013
"azure.ai.projects.onedp.models.Deployment": "Azure.AI.Projects.Deployment",
1114
"azure.ai.projects.onedp.models.EmbeddingConfiguration": "Azure.AI.Projects.EmbeddingConfiguration",
15+
"azure.ai.projects.onedp.models.EntraIDCredentials": "Azure.AI.Projects.EntraIDCredentials",
1216
"azure.ai.projects.onedp.models.Evaluation": "Azure.AI.Projects.Evaluation",
13-
"azure.ai.projects.onedp.models.EvaluationResult": "Azure.AI.Projects.EvaluationResult",
1417
"azure.ai.projects.onedp.models.EvaluatorConfiguration": "Azure.AI.Projects.EvaluatorConfiguration",
1518
"azure.ai.projects.onedp.models.FileDatasetVersion": "Azure.AI.Projects.FileDatasetVersion",
1619
"azure.ai.projects.onedp.models.FolderDatasetVersion": "Azure.AI.Projects.FolderDatasetVersion",
1720
"azure.ai.projects.onedp.models.InputData": "Azure.AI.Projects.InputData",
1821
"azure.ai.projects.onedp.models.InputDataset": "Azure.AI.Projects.InputDataset",
1922
"azure.ai.projects.onedp.models.ManagedAzureAISearchIndex": "Azure.AI.Projects.ManagedAzureAISearchIndex",
2023
"azure.ai.projects.onedp.models.ModelDeployment": "Azure.AI.Projects.ModelDeployment",
24+
"azure.ai.projects.onedp.models.NoAuthenticationCredentials": "Azure.AI.Projects.NoAuthenticationCredentials",
2125
"azure.ai.projects.onedp.models.PendingUploadRequest": "Azure.AI.Projects.PendingUploadRequest",
2226
"azure.ai.projects.onedp.models.PendingUploadResponse": "Azure.AI.Projects.PendingUploadResponse",
2327
"azure.ai.projects.onedp.models.RedTeam": "Azure.AI.Projects.RedTeam",
2428
"azure.ai.projects.onedp.models.SasCredential": "Azure.AI.Projects.SasCredential",
29+
"azure.ai.projects.onedp.models.SASCredentials": "Azure.AI.Projects.SASCredentials",
2530
"azure.ai.projects.onedp.models.Sku": "Azure.AI.Projects.Sku",
2631
"azure.ai.projects.onedp.models.ConnectionType": "Azure.AI.Projects.ConnectionType",
27-
"azure.ai.projects.onedp.models.AuthenticationType": "Azure.AI.Projects.AuthenticationType",
32+
"azure.ai.projects.onedp.models.CredentialType": "Azure.AI.Projects.CredentialType",
2833
"azure.ai.projects.onedp.models.DatasetType": "Azure.AI.Projects.DatasetType",
2934
"azure.ai.projects.onedp.models.ListViewType": "Azure.AI.Projects.ListViewType",
30-
"azure.ai.projects.onedp.models.RepeatabilityResult": "Azure.Core.RepeatabilityResult",
3135
"azure.ai.projects.onedp.models.PendingUploadType": "Azure.AI.Projects.PendingUploadType",
3236
"azure.ai.projects.onedp.models.IndexType": "Azure.AI.Projects.IndexType",
3337
"azure.ai.projects.onedp.models.DeploymentType": "Azure.AI.Projects.DeploymentType",
34-
"azure.ai.projects.onedp.models.ResultType": "Azure.AI.Projects.ResultType",
3538
"azure.ai.projects.onedp.models.AttackStrategy": "Azure.AI.Projects.AttackStrategy",
3639
"azure.ai.projects.onedp.models.RiskCategory": "Azure.AI.Projects.RiskCategory",
3740
"azure.ai.projects.onedp.AIProjectClient.connections.get": "Azure.AI.Projects.Connections.get",
41+
"azure.ai.projects.onedp.AIProjectClient.connections.get_with_credentials": "Azure.AI.Projects.Connections.getWithCredentials",
3842
"azure.ai.projects.onedp.AIProjectClient.connections.list": "Azure.AI.Projects.Connections.list",
3943
"azure.ai.projects.onedp.AIProjectClient.evaluations.get": "Azure.AI.Projects.Evaluations.get",
4044
"azure.ai.projects.onedp.AIProjectClient.evaluations.list": "Azure.AI.Projects.Evaluations.list",
@@ -43,25 +47,15 @@
4347
"azure.ai.projects.onedp.AIProjectClient.datasets.list_latest": "Azure.AI.Projects.ServicePatterns.Datasets.listLatest",
4448
"azure.ai.projects.onedp.AIProjectClient.datasets.get_version": "Azure.AI.Projects.ServicePatterns.Datasets.getVersion",
4549
"azure.ai.projects.onedp.AIProjectClient.datasets.delete_version": "Azure.AI.Projects.ServicePatterns.Datasets.deleteVersion",
46-
"azure.ai.projects.onedp.AIProjectClient.datasets.create": "Azure.AI.Projects.ServicePatterns.Datasets.create",
4750
"azure.ai.projects.onedp.AIProjectClient.datasets.create_version": "Azure.AI.Projects.ServicePatterns.Datasets.createVersion",
4851
"azure.ai.projects.onedp.AIProjectClient.datasets.start_pending_upload_version": "Azure.AI.Projects.Datasets.startPendingUploadVersion",
49-
"azure.ai.projects.onedp.AIProjectClient.datasets.start_pending_upload": "Azure.AI.Projects.Datasets.startPendingUpload",
5052
"azure.ai.projects.onedp.AIProjectClient.indexes.list_versions": "Azure.AI.Projects.ServicePatterns.Indexes.listVersions",
5153
"azure.ai.projects.onedp.AIProjectClient.indexes.list_latest": "Azure.AI.Projects.ServicePatterns.Indexes.listLatest",
5254
"azure.ai.projects.onedp.AIProjectClient.indexes.get_version": "Azure.AI.Projects.ServicePatterns.Indexes.getVersion",
5355
"azure.ai.projects.onedp.AIProjectClient.indexes.delete_version": "Azure.AI.Projects.ServicePatterns.Indexes.deleteVersion",
54-
"azure.ai.projects.onedp.AIProjectClient.indexes.create": "Azure.AI.Projects.ServicePatterns.Indexes.create",
5556
"azure.ai.projects.onedp.AIProjectClient.indexes.create_version": "Azure.AI.Projects.ServicePatterns.Indexes.createVersion",
5657
"azure.ai.projects.onedp.AIProjectClient.deployments.get": "Azure.AI.Projects.Deployments.get",
5758
"azure.ai.projects.onedp.AIProjectClient.deployments.list": "Azure.AI.Projects.Deployments.list",
58-
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.list_versions": "Azure.AI.Projects.ServicePatterns.EvaluationResults.listVersions",
59-
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.list_latest": "Azure.AI.Projects.ServicePatterns.EvaluationResults.listLatest",
60-
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.get_version": "Azure.AI.Projects.ServicePatterns.EvaluationResults.getVersion",
61-
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.delete_version": "Azure.AI.Projects.ServicePatterns.EvaluationResults.deleteVersion",
62-
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.create": "Azure.AI.Projects.ServicePatterns.EvaluationResults.create",
63-
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.create_version": "Azure.AI.Projects.ServicePatterns.EvaluationResults.createVersion",
64-
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.start_pending_upload": "Azure.AI.Projects.EvaluationResults.startPendingUpload",
6559
"azure.ai.projects.onedp.AIProjectClient.red_teams.get": "Azure.AI.Projects.RedTeams.get",
6660
"azure.ai.projects.onedp.AIProjectClient.red_teams.list": "Azure.AI.Projects.RedTeams.list",
6761
"azure.ai.projects.onedp.AIProjectClient.red_teams.create_run": "Azure.AI.Projects.RedTeams.createRun"

sdk/ai/azure-ai-projects-onedp/azure/ai/projects/onedp/_client.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
ConnectionsOperations,
2222
DatasetsOperations,
2323
DeploymentsOperations,
24-
EvaluationResultsOperations,
2524
EvaluationsOperations,
2625
IndexesOperations,
2726
RedTeamsOperations,
@@ -47,8 +46,6 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes
4746
:vartype indexes: azure.ai.projects.onedp.operations.IndexesOperations
4847
:ivar deployments: DeploymentsOperations operations
4948
:vartype deployments: azure.ai.projects.onedp.operations.DeploymentsOperations
50-
:ivar evaluation_results: EvaluationResultsOperations operations
51-
:vartype evaluation_results: azure.ai.projects.onedp.operations.EvaluationResultsOperations
5249
:ivar red_teams: RedTeamsOperations operations
5350
:vartype red_teams: azure.ai.projects.onedp.operations.RedTeamsOperations
5451
:param endpoint: Project endpoint in the form of:
@@ -97,9 +94,6 @@ def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCr
9794
self.datasets = DatasetsOperations(self._client, self._config, self._serialize, self._deserialize)
9895
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)
9996
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
100-
self.evaluation_results = EvaluationResultsOperations(
101-
self._client, self._config, self._serialize, self._deserialize
102-
)
10397
self.red_teams = RedTeamsOperations(self._client, self._config, self._serialize, self._deserialize)
10498

10599
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:

sdk/ai/azure-ai-projects-onedp/azure/ai/projects/onedp/_patch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from typing import List, Any, Union, Optional
1010
from azure.core.credentials import AzureKeyCredential
1111
from ._client import AIProjectClient as AIProjectClientGenerated
12-
from .operations import TelemetryOperations, InferenceOperations
12+
from .operations import TelemetryOperations, InferenceOperations, AssistantsOperations
13+
1314

1415
class AIProjectClient(AIProjectClientGenerated): # pylint: disable=too-many-instance-attributes
1516
"""AIProjectClient.
@@ -48,11 +49,10 @@ def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCr
4849
super().__init__(endpoint=endpoint, credential=credential, **kwargs)
4950
self.telemetry = TelemetryOperations(self)
5051
self.inference = InferenceOperations(self)
52+
self.assistants = AssistantsOperations(self)
5153

5254

53-
__all__: List[str] = [
54-
"AIProjectClient"
55-
] # Add all objects you want publicly available to users at this package level
55+
__all__: List[str] = ["AIProjectClient"] # Add all objects you want publicly available to users at this package level
5656

5757

5858
def patch_sdk():

sdk/ai/azure-ai-projects-onedp/azure/ai/projects/onedp/aio/_client.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
ConnectionsOperations,
2222
DatasetsOperations,
2323
DeploymentsOperations,
24-
EvaluationResultsOperations,
2524
EvaluationsOperations,
2625
IndexesOperations,
2726
RedTeamsOperations,
@@ -47,8 +46,6 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes
4746
:vartype indexes: azure.ai.projects.onedp.aio.operations.IndexesOperations
4847
:ivar deployments: DeploymentsOperations operations
4948
:vartype deployments: azure.ai.projects.onedp.aio.operations.DeploymentsOperations
50-
:ivar evaluation_results: EvaluationResultsOperations operations
51-
:vartype evaluation_results: azure.ai.projects.onedp.aio.operations.EvaluationResultsOperations
5249
:ivar red_teams: RedTeamsOperations operations
5350
:vartype red_teams: azure.ai.projects.onedp.aio.operations.RedTeamsOperations
5451
:param endpoint: Project endpoint in the form of:
@@ -99,9 +96,6 @@ def __init__(
9996
self.datasets = DatasetsOperations(self._client, self._config, self._serialize, self._deserialize)
10097
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)
10198
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
102-
self.evaluation_results = EvaluationResultsOperations(
103-
self._client, self._config, self._serialize, self._deserialize
104-
)
10599
self.red_teams = RedTeamsOperations(self._client, self._config, self._serialize, self._deserialize)
106100

107101
def send_request(

sdk/ai/azure-ai-projects-onedp/azure/ai/projects/onedp/aio/_patch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from typing import List, Optional, Union, Any
1010
from azure.core.credentials import AzureKeyCredential
1111
from ._client import AIProjectClient as AIProjectClientGenerated
12-
from .operations import InferenceOperations
12+
from .operations import InferenceOperations, AssistantsOperations, TelemetryOperations
13+
1314

1415
class AIProjectClient(AIProjectClientGenerated): # pylint: disable=too-many-instance-attributes
1516
"""AIProjectClient.
@@ -48,12 +49,12 @@ def __init__(
4849
) -> None:
4950
self._user_agent: Optional[str] = kwargs.get("user_agent", None)
5051
super().__init__(endpoint=endpoint, credential=credential, **kwargs)
52+
self.telemetry = TelemetryOperations(self)
5153
self.inference = InferenceOperations(self)
54+
self.assistants = AssistantsOperations(self)
5255

5356

54-
__all__: List[str] = [
55-
"AIProjectClient"
56-
] # Add all objects you want publicly available to users at this package level
57+
__all__: List[str] = ["AIProjectClient"] # Add all objects you want publicly available to users at this package level
5758

5859

5960
def patch_sdk():

sdk/ai/azure-ai-projects-onedp/azure/ai/projects/onedp/aio/operations/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from ._operations import DatasetsOperations # type: ignore
1919
from ._operations import IndexesOperations # type: ignore
2020
from ._operations import DeploymentsOperations # type: ignore
21-
from ._operations import EvaluationResultsOperations # type: ignore
2221
from ._operations import RedTeamsOperations # type: ignore
2322

2423
from ._patch import __all__ as _patch_all
@@ -32,7 +31,6 @@
3231
"DatasetsOperations",
3332
"IndexesOperations",
3433
"DeploymentsOperations",
35-
"EvaluationResultsOperations",
3634
"RedTeamsOperations",
3735
]
3836
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore

0 commit comments

Comments
 (0)