Skip to content

Updating client to add private API needed for evaluation #40484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions sdk/ai/azure-ai-projects-onedp/apiview-properties.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"CrossLanguagePackageId": "Azure.AI.Projects",
"CrossLanguageDefinitionId": {
"azure.ai.projects.onedp.models.AssetCredentialRequest": "Azure.AI.Projects.AssetCredentialRequest",
"azure.ai.projects.onedp.models.AssetCredentialResponse": "Azure.AI.Projects.AssetCredentialResponse",
"azure.ai.projects.onedp.models.Index": "Azure.AI.Projects.Index",
"azure.ai.projects.onedp.models.AzureAISearchIndex": "Azure.AI.Projects.AzureAISearchIndex",
"azure.ai.projects.onedp.models.BlobReferenceForConsumption": "Azure.AI.Projects.BlobReferenceForConsumption",
Expand All @@ -10,7 +12,6 @@
"azure.ai.projects.onedp.models.Deployment": "Azure.AI.Projects.Deployment",
"azure.ai.projects.onedp.models.EmbeddingConfiguration": "Azure.AI.Projects.EmbeddingConfiguration",
"azure.ai.projects.onedp.models.Evaluation": "Azure.AI.Projects.Evaluation",
"azure.ai.projects.onedp.models.EvaluationResult": "Azure.AI.Projects.EvaluationResult",
"azure.ai.projects.onedp.models.EvaluatorConfiguration": "Azure.AI.Projects.EvaluatorConfiguration",
"azure.ai.projects.onedp.models.FileDatasetVersion": "Azure.AI.Projects.FileDatasetVersion",
"azure.ai.projects.onedp.models.FolderDatasetVersion": "Azure.AI.Projects.FolderDatasetVersion",
Expand All @@ -20,9 +21,9 @@
"azure.ai.projects.onedp.models.ModelDeployment": "Azure.AI.Projects.ModelDeployment",
"azure.ai.projects.onedp.models.PendingUploadRequest": "Azure.AI.Projects.PendingUploadRequest",
"azure.ai.projects.onedp.models.PendingUploadResponse": "Azure.AI.Projects.PendingUploadResponse",
"azure.ai.projects.onedp.models.RedTeam": "Azure.AI.Projects.RedTeam",
"azure.ai.projects.onedp.models.SasCredential": "Azure.AI.Projects.SasCredential",
"azure.ai.projects.onedp.models.Sku": "Azure.AI.Projects.Sku",
"azure.ai.projects.onedp.models.SystemData": "Azure.AI.Projects.SystemData",
"azure.ai.projects.onedp.models.ConnectionType": "Azure.AI.Projects.ConnectionType",
"azure.ai.projects.onedp.models.AuthenticationType": "Azure.AI.Projects.AuthenticationType",
"azure.ai.projects.onedp.models.DatasetType": "Azure.AI.Projects.DatasetType",
Expand All @@ -31,9 +32,6 @@
"azure.ai.projects.onedp.models.PendingUploadType": "Azure.AI.Projects.PendingUploadType",
"azure.ai.projects.onedp.models.IndexType": "Azure.AI.Projects.IndexType",
"azure.ai.projects.onedp.models.DeploymentType": "Azure.AI.Projects.DeploymentType",
"azure.ai.projects.onedp.models.ResultType": "Azure.AI.Projects.ResultType",
"azure.ai.projects.onedp.models.AttackStrategy": "Azure.AI.Projects.AttackStrategy",
"azure.ai.projects.onedp.models.RiskCategory": "Azure.AI.Projects.RiskCategory",
"azure.ai.projects.onedp.AIProjectClient.connections.get": "Azure.AI.Projects.Connections.get",
"azure.ai.projects.onedp.AIProjectClient.connections.list": "Azure.AI.Projects.Connections.list",
"azure.ai.projects.onedp.AIProjectClient.evaluations.get": "Azure.AI.Projects.Evaluations.get",
Expand All @@ -47,23 +45,14 @@
"azure.ai.projects.onedp.AIProjectClient.datasets.create_version": "Azure.AI.Projects.ServicePatterns.Datasets.createVersion",
"azure.ai.projects.onedp.AIProjectClient.datasets.start_pending_upload_version": "Azure.AI.Projects.Datasets.startPendingUploadVersion",
"azure.ai.projects.onedp.AIProjectClient.datasets.start_pending_upload": "Azure.AI.Projects.Datasets.startPendingUpload",
"azure.ai.projects.onedp.AIProjectClient.datasets.fetch_asset_credentials": "Azure.AI.Projects.Datasets.FetchAssetCredentials",
"azure.ai.projects.onedp.AIProjectClient.indexes.list_versions": "Azure.AI.Projects.ServicePatterns.Indexes.listVersions",
"azure.ai.projects.onedp.AIProjectClient.indexes.list_latest": "Azure.AI.Projects.ServicePatterns.Indexes.listLatest",
"azure.ai.projects.onedp.AIProjectClient.indexes.get_version": "Azure.AI.Projects.ServicePatterns.Indexes.getVersion",
"azure.ai.projects.onedp.AIProjectClient.indexes.delete_version": "Azure.AI.Projects.ServicePatterns.Indexes.deleteVersion",
"azure.ai.projects.onedp.AIProjectClient.indexes.create": "Azure.AI.Projects.ServicePatterns.Indexes.create",
"azure.ai.projects.onedp.AIProjectClient.indexes.create_version": "Azure.AI.Projects.ServicePatterns.Indexes.createVersion",
"azure.ai.projects.onedp.AIProjectClient.deployments.get": "Azure.AI.Projects.Deployments.get",
"azure.ai.projects.onedp.AIProjectClient.deployments.list": "Azure.AI.Projects.Deployments.list",
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.list_versions": "Azure.AI.Projects.ServicePatterns.EvaluationResults.listVersions",
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.list_latest": "Azure.AI.Projects.ServicePatterns.EvaluationResults.listLatest",
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.get_version": "Azure.AI.Projects.ServicePatterns.EvaluationResults.getVersion",
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.delete_version": "Azure.AI.Projects.ServicePatterns.EvaluationResults.deleteVersion",
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.create": "Azure.AI.Projects.ServicePatterns.EvaluationResults.create",
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.create_version": "Azure.AI.Projects.ServicePatterns.EvaluationResults.createVersion",
"azure.ai.projects.onedp.AIProjectClient.evaluation_results.start_pending_upload": "Azure.AI.Projects.EvaluationResults.startPendingUpload",
"azure.ai.projects.onedp.AIProjectClient.red_teams.get": "Azure.AI.Projects.RedTeams.get",
"azure.ai.projects.onedp.AIProjectClient.red_teams.list": "Azure.AI.Projects.RedTeams.list",
"azure.ai.projects.onedp.AIProjectClient.red_teams.create_run": "Azure.AI.Projects.RedTeams.createRun"
"azure.ai.projects.onedp.AIProjectClient.deployments.list": "Azure.AI.Projects.Deployments.list"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes
:vartype indexes: azure.ai.projects.onedp.operations.IndexesOperations
:ivar deployments: DeploymentsOperations operations
:vartype deployments: azure.ai.projects.onedp.operations.DeploymentsOperations
:ivar evaluation_results: EvaluationResultsOperations operations
:vartype evaluation_results: azure.ai.projects.onedp.operations.EvaluationResultsOperations
:ivar red_teams: RedTeamsOperations operations
:vartype red_teams: azure.ai.projects.onedp.operations.RedTeamsOperations
:ivar evaluation_results: EvaluationResultsOperations operations
:vartype evaluation_results: azure.ai.projects.onedp.operations.EvaluationResultsOperations
:param endpoint: Project endpoint in the form of:
https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name>. Required.
:type endpoint: str
Expand Down Expand Up @@ -97,10 +97,10 @@ def __init__(self, endpoint: str, credential: Union[AzureKeyCredential, "TokenCr
self.datasets = DatasetsOperations(self._client, self._config, self._serialize, self._deserialize)
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.red_teams = RedTeamsOperations(self._client, self._config, self._serialize, self._deserialize)
self.evaluation_results = EvaluationResultsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.red_teams = RedTeamsOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class AIProjectClient: # pylint: disable=too-many-instance-attributes
:vartype indexes: azure.ai.projects.onedp.aio.operations.IndexesOperations
:ivar deployments: DeploymentsOperations operations
:vartype deployments: azure.ai.projects.onedp.aio.operations.DeploymentsOperations
:ivar evaluation_results: EvaluationResultsOperations operations
:vartype evaluation_results: azure.ai.projects.onedp.aio.operations.EvaluationResultsOperations
:ivar red_teams: RedTeamsOperations operations
:vartype red_teams: azure.ai.projects.onedp.aio.operations.RedTeamsOperations
:ivar evaluation_results: EvaluationResultsOperations operations
:vartype evaluation_results: azure.ai.projects.onedp.aio.operations.EvaluationResultsOperations
:param endpoint: Project endpoint in the form of:
https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name>. Required.
:type endpoint: str
Expand Down Expand Up @@ -99,10 +99,10 @@ def __init__(
self.datasets = DatasetsOperations(self._client, self._config, self._serialize, self._deserialize)
self.indexes = IndexesOperations(self._client, self._config, self._serialize, self._deserialize)
self.deployments = DeploymentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.red_teams = RedTeamsOperations(self._client, self._config, self._serialize, self._deserialize)
self.evaluation_results = EvaluationResultsOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.red_teams = RedTeamsOperations(self._client, self._config, self._serialize, self._deserialize)

def send_request(
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
from ._operations import DatasetsOperations # type: ignore
from ._operations import IndexesOperations # type: ignore
from ._operations import DeploymentsOperations # type: ignore
from ._operations import EvaluationResultsOperations # type: ignore
from ._operations import RedTeamsOperations # type: ignore
from ._operations import EvaluationResultsOperations # type: ignore

from ._patch import __all__ as _patch_all
from ._patch import *
Expand All @@ -32,8 +32,8 @@
"DatasetsOperations",
"IndexesOperations",
"DeploymentsOperations",
"EvaluationResultsOperations",
"RedTeamsOperations",
"EvaluationResultsOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
Loading