Skip to content
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

Users/singankit/evaluator crud #35001

Merged
merged 37 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
60cadc9
Adding tests to capture groundedness with expected values
singankit Feb 15, 2024
d122f3d
Merge branch 'Azure:main' into main
singankit Feb 15, 2024
08b5232
Merge branch 'Azure:main' into main
singankit Feb 27, 2024
cd21d6a
Merge branch 'Azure:main' into main
singankit Feb 29, 2024
ba9d3f4
Merge branch 'Azure:main' into main
singankit Mar 4, 2024
0b5357d
Merge branch 'Azure:main' into main
singankit Mar 4, 2024
cd7bcbf
Merge branch 'Azure:main' into main
singankit Mar 15, 2024
efc5db3
Merge branch 'Azure:main' into main
singankit Mar 22, 2024
8c18546
Merge branch 'Azure:main' into main
singankit Mar 22, 2024
01cec57
Merge branch 'Azure:main' into main
singankit Mar 26, 2024
d1cb943
Merge branch 'Azure:main' into main
singankit Mar 28, 2024
c719ea0
Evalutors API
singankit Mar 28, 2024
13e385b
Merge branch 'main' of https://github.com/singankit/azure-sdk-for-python
singankit Mar 28, 2024
33baee9
Merge branch 'Azure:main' into main
singankit Mar 28, 2024
c2a9656
Add tests and minor fixes
nick863 Apr 5, 2024
1768f21
Add CHANGELOG
nick863 Apr 5, 2024
75521d9
Fix linters
nick863 Apr 6, 2024
975bfa4
Fix mypy
nick863 Apr 6, 2024
c819caf
Reuse model operations code for evaluator operations.
nick863 Apr 8, 2024
f9687bd
Do not allow creating the different type of a model, if the previous …
nick863 Apr 9, 2024
8771e31
Do not allow creation of evaluators by ModelOperations
nick863 Apr 10, 2024
d2d4caf
Merge pull request #2 from nick863/nirovins/add_utit_test_and_fix
singankit Apr 11, 2024
a364dfd
Merge branch 'Azure:main' into main
singankit Apr 23, 2024
78a110c
Fixes
nick863 May 2, 2024
2c2b50f
Merge branch 'main' of https://github.com/singankit/azure-sdk-for-pyt…
nick863 May 3, 2024
9a2167a
Merge to main
nick863 May 3, 2024
0987af4
Merge pull request #4 from singankit/nirovins/merge_to_azure_main
nick863 May 3, 2024
578b3b8
Merge to main
nick863 May 3, 2024
1a0953c
Linter fix
nick863 May 3, 2024
48e98ab
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python …
nick863 May 3, 2024
030c5c9
Merge pull request #5 from singankit/nirovins/merge_fork
nick863 May 3, 2024
c98d777
Make new recordings
nick863 May 3, 2024
8423413
Fix
nick863 May 3, 2024
7cf23c8
Fix
nick863 May 3, 2024
017e512
Fix
nick863 May 4, 2024
e74f19d
Fix typo
nick863 May 4, 2024
bd2a5de
Fix linters and unittests
nick863 May 4, 2024
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
29 changes: 29 additions & 0 deletions sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
EnvironmentOperations,
JobOperations,
ModelOperations,
EvaluatorOperations,
OnlineDeploymentOperations,
OnlineEndpointOperations,
RegistryOperations,
Expand Down Expand Up @@ -512,6 +513,25 @@ def __init__(
registry_reference=registry_reference,
**app_insights_handler_kwargs, # type: ignore[arg-type]
)
# Evaluators
self._evaluators = EvaluatorOperations(
nick863 marked this conversation as resolved.
Show resolved Hide resolved
self._operation_scope,
self._operation_config,
(
self._service_client_10_2021_dataplanepreview
if registry_name or registry_reference
else self._service_client_08_2023_preview
),
self._datastores,
self._operation_container,
requests_pipeline=self._requests_pipeline,
control_plane_client=self._service_client_08_2023_preview,
workspace_rg=self._ws_rg,
workspace_sub=self._ws_sub,
registry_reference=registry_reference,
**app_insights_handler_kwargs, # type: ignore[arg-type]
)

self._operation_container.add(AzureMLResourceType.MODEL, self._models)
self._code = CodeOperations(
self._ws_operation_scope if registry_reference else self._operation_scope,
Expand Down Expand Up @@ -909,6 +929,15 @@ def models(self) -> ModelOperations:
"""
return self._models

@property
nick863 marked this conversation as resolved.
Show resolved Hide resolved
def evaluators(self) -> EvaluatorOperations:
"""A collection of model related operations.

:return: Model operations
:rtype: ~azure.ai.ml.operations.ModelOperations
"""
return self._evaluators

@property
def online_endpoints(self) -> OnlineEndpointOperations:
"""A collection of online endpoint related operations.
Expand Down
11 changes: 11 additions & 0 deletions sdk/ml/azure-ai-ml/azure/ai/ml/_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1418,3 +1418,14 @@ def extract_name_and_version(azureml_id: str) -> Dict[str, str]:
"name": name,
"version": version,
}


def _get_evaluator_properties():
return {
nick863 marked this conversation as resolved.
Show resolved Hide resolved
"is-promptflow": "true",
"is-evaluator": "true"
}


def _is_evaluator(properties: Dict[str, str]) -> bool:
return properties.get("is-evaluator") == "true" and properties.get("is-promptflow") == "true"
2 changes: 2 additions & 0 deletions sdk/ml/azure-ai-ml/azure/ai/ml/operations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@
from ._workspace_hub_operation import WorkspaceHubOperations
from ._workspace_operations import WorkspaceOperations
from ._workspace_outbound_rule_operations import WorkspaceOutboundRuleOperations
from ._evaluator_operations import EvaluatorOperations

__all__ = [
"ComputeOperations",
"DatastoreOperations",
"JobOperations",
"ModelOperations",
"EvaluatorOperations",
"WorkspaceOperations",
"RegistryOperations",
"OnlineEndpointOperations",
Expand Down
Loading
Loading