diff --git a/src/service_name.json b/src/service_name.json index dc6be1724f9..4904fb10d97 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -933,5 +933,10 @@ "Command": "az pinecone", "AzureServiceName": "Pinecone", "URL": "https://learn.microsoft.com/en-us/azure/partner-solutions" + }, + { + "Command": "az weights-and-biases", + "AzureServiceName": "WeightsAndBiases", + "URL": "https://learn.microsoft.com/en-us/azure/partner-solutions" } ] diff --git a/src/weights-and-biases/HISTORY.rst b/src/weights-and-biases/HISTORY.rst new file mode 100644 index 00000000000..abbff5a61a7 --- /dev/null +++ b/src/weights-and-biases/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +1.0.0b1 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/weights-and-biases/README.md b/src/weights-and-biases/README.md new file mode 100644 index 00000000000..3dc8744869d --- /dev/null +++ b/src/weights-and-biases/README.md @@ -0,0 +1,28 @@ +# Azure CLI WeightsAndBiases Extension # +This is an extension to Azure CLI to manage WeightsAndBiases resources. + +## How to use ## +#### Install the extension #### +Install this extension using the below CLI command +``` +az extension add --name weights-and-biases +``` +#### Check the version #### +``` +az extension show --name weights-and-biases --query version +``` +#### Connect to Azure subscription #### +``` +az login +az account set -s {subs_id} +``` +#### List an weights-and-biases instance #### +``` +az weights-and-biases instance list --resource-group jawt-rg +``` +#### Get a weights-and-biases instance resource #### +``` +az weights-and-biases instance show --resource-group jawt-rg --instancename wnb-test-org-5 +``` + +If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues. \ No newline at end of file diff --git a/src/weights-and-biases/azext_weights_and_biases/__init__.py b/src/weights-and-biases/azext_weights_and_biases/__init__.py new file mode 100644 index 00000000000..e61fe7009e3 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/__init__.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azext_weights_and_biases._help import helps # pylint: disable=unused-import + + +class WeightsAndBiasesCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + custom_command_type = CliCommandType( + operations_tmpl='azext_weights_and_biases.custom#{}') + super().__init__(cli_ctx=cli_ctx, + custom_command_type=custom_command_type) + + def load_command_table(self, args): + from azext_weights_and_biases.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_weights_and_biases._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = WeightsAndBiasesCommandsLoader diff --git a/src/weights-and-biases/azext_weights_and_biases/_help.py b/src/weights-and-biases/azext_weights_and_biases/_help.py new file mode 100644 index 00000000000..126d5d00714 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/_help.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/weights-and-biases/azext_weights_and_biases/_params.py b/src/weights-and-biases/azext_weights_and_biases/_params.py new file mode 100644 index 00000000000..cfcec717c9c --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/_params.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/weights-and-biases/azext_weights_and_biases/aaz/__init__.py b/src/weights-and-biases/azext_weights_and_biases/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/weights-and-biases/azext_weights_and_biases/aaz/latest/__init__.py b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/__init__.py new file mode 100644 index 00000000000..f6acc11aa4e --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/__init__.py @@ -0,0 +1,10 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + diff --git a/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/__cmd_group.py b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/__cmd_group.py new file mode 100644 index 00000000000..9fe65f20c92 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "weights-and-biases", +) +class __CMDGroup(AAZCommandGroup): + """Manage Weights And Biases + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/__init__.py b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/__cmd_group.py b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/__cmd_group.py new file mode 100644 index 00000000000..ad02bd16fdd --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "weights-and-biases instance", +) +class __CMDGroup(AAZCommandGroup): + """Manage Instance + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/__init__.py b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/_list.py b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/_list.py new file mode 100644 index 00000000000..e690d9ea1e2 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/_list.py @@ -0,0 +1,590 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "weights-and-biases instance list", +) +class List(AAZCommand): + """List InstanceResource resources by subscription ID + + :example: Instances_ListBySubscription - generated by [MaximumSet] rule + az weights-and-biases instance list --resource-group jawt-rg + """ + + _aaz_info = { + "version": "2024-09-18-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.weightsandbiases/instances", "2024-09-18-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.weightsandbiases/instances", "2024-09-18-preview"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.InstancesListBySubscription(ctx=self.ctx)() + if condition_1: + self.InstancesListByResourceGroup(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class InstancesListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.WeightsAndBiases/instances", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-09-18-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZIdentityObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.marketplace = AAZObjectType( + flags={"required": True}, + ) + properties.partner_properties = AAZObjectType( + serialized_name="partnerProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.single_sign_on_properties = AAZObjectType( + serialized_name="singleSignOnProperties", + ) + properties.user = AAZObjectType( + flags={"required": True}, + ) + + marketplace = cls._schema_on_200.value.Element.properties.marketplace + marketplace.offer_details = AAZObjectType( + serialized_name="offerDetails", + flags={"required": True}, + ) + marketplace.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + marketplace.subscription_status = AAZStrType( + serialized_name="subscriptionStatus", + flags={"read_only": True}, + ) + + offer_details = cls._schema_on_200.value.Element.properties.marketplace.offer_details + offer_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + offer_details.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + offer_details.plan_name = AAZStrType( + serialized_name="planName", + ) + offer_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + offer_details.term_id = AAZStrType( + serialized_name="termId", + ) + offer_details.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + partner_properties = cls._schema_on_200.value.Element.properties.partner_properties + partner_properties.region = AAZStrType( + flags={"required": True}, + ) + partner_properties.subdomain = AAZStrType( + flags={"required": True}, + ) + + single_sign_on_properties = cls._schema_on_200.value.Element.properties.single_sign_on_properties + single_sign_on_properties.aad_domains = AAZListType( + serialized_name="aadDomains", + ) + single_sign_on_properties.enterprise_app_id = AAZStrType( + serialized_name="enterpriseAppId", + ) + single_sign_on_properties.state = AAZStrType() + single_sign_on_properties.type = AAZStrType( + flags={"required": True}, + ) + single_sign_on_properties.url = AAZStrType() + + aad_domains = cls._schema_on_200.value.Element.properties.single_sign_on_properties.aad_domains + aad_domains.Element = AAZStrType() + + user = cls._schema_on_200.value.Element.properties.user + user.email_address = AAZStrType( + serialized_name="emailAddress", + ) + user.first_name = AAZStrType( + serialized_name="firstName", + ) + user.last_name = AAZStrType( + serialized_name="lastName", + ) + user.phone_number = AAZStrType( + serialized_name="phoneNumber", + ) + user.upn = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class InstancesListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-09-18-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZIdentityObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.marketplace = AAZObjectType( + flags={"required": True}, + ) + properties.partner_properties = AAZObjectType( + serialized_name="partnerProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.single_sign_on_properties = AAZObjectType( + serialized_name="singleSignOnProperties", + ) + properties.user = AAZObjectType( + flags={"required": True}, + ) + + marketplace = cls._schema_on_200.value.Element.properties.marketplace + marketplace.offer_details = AAZObjectType( + serialized_name="offerDetails", + flags={"required": True}, + ) + marketplace.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + marketplace.subscription_status = AAZStrType( + serialized_name="subscriptionStatus", + flags={"read_only": True}, + ) + + offer_details = cls._schema_on_200.value.Element.properties.marketplace.offer_details + offer_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + offer_details.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + offer_details.plan_name = AAZStrType( + serialized_name="planName", + ) + offer_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + offer_details.term_id = AAZStrType( + serialized_name="termId", + ) + offer_details.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + partner_properties = cls._schema_on_200.value.Element.properties.partner_properties + partner_properties.region = AAZStrType( + flags={"required": True}, + ) + partner_properties.subdomain = AAZStrType( + flags={"required": True}, + ) + + single_sign_on_properties = cls._schema_on_200.value.Element.properties.single_sign_on_properties + single_sign_on_properties.aad_domains = AAZListType( + serialized_name="aadDomains", + ) + single_sign_on_properties.enterprise_app_id = AAZStrType( + serialized_name="enterpriseAppId", + ) + single_sign_on_properties.state = AAZStrType() + single_sign_on_properties.type = AAZStrType( + flags={"required": True}, + ) + single_sign_on_properties.url = AAZStrType() + + aad_domains = cls._schema_on_200.value.Element.properties.single_sign_on_properties.aad_domains + aad_domains.Element = AAZStrType() + + user = cls._schema_on_200.value.Element.properties.user + user.email_address = AAZStrType( + serialized_name="emailAddress", + ) + user.first_name = AAZStrType( + serialized_name="firstName", + ) + user.last_name = AAZStrType( + serialized_name="lastName", + ) + user.phone_number = AAZStrType( + serialized_name="phoneNumber", + ) + user.upn = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/_show.py b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/_show.py new file mode 100644 index 00000000000..7c8cb4ee6dc --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/aaz/latest/weights_and_biases/instance/_show.py @@ -0,0 +1,335 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "weights-and-biases instance show", +) +class Show(AAZCommand): + """Get a InstanceResource + + :example: Instances_Get - generated by [MaximumSet] rule + az weights-and-biases instance show --resource-group jawt-rg --instancename wnb-test-org-5 + """ + + _aaz_info = { + "version": "2024-09-18-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.weightsandbiases/instances/{}", "2024-09-18-preview"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.instancename = AAZStrArg( + options=["-n", "--name", "--instancename"], + help="Name of the Instance resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.InstancesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class InstancesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WeightsAndBiases/instances/{instancename}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "instancename", self.ctx.args.instancename, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-09-18-preview", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.marketplace = AAZObjectType( + flags={"required": True}, + ) + properties.partner_properties = AAZObjectType( + serialized_name="partnerProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.single_sign_on_properties = AAZObjectType( + serialized_name="singleSignOnProperties", + ) + properties.user = AAZObjectType( + flags={"required": True}, + ) + + marketplace = cls._schema_on_200.properties.marketplace + marketplace.offer_details = AAZObjectType( + serialized_name="offerDetails", + flags={"required": True}, + ) + marketplace.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + marketplace.subscription_status = AAZStrType( + serialized_name="subscriptionStatus", + flags={"read_only": True}, + ) + + offer_details = cls._schema_on_200.properties.marketplace.offer_details + offer_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + offer_details.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + offer_details.plan_name = AAZStrType( + serialized_name="planName", + ) + offer_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + offer_details.term_id = AAZStrType( + serialized_name="termId", + ) + offer_details.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + partner_properties = cls._schema_on_200.properties.partner_properties + partner_properties.region = AAZStrType( + flags={"required": True}, + ) + partner_properties.subdomain = AAZStrType( + flags={"required": True}, + ) + + single_sign_on_properties = cls._schema_on_200.properties.single_sign_on_properties + single_sign_on_properties.aad_domains = AAZListType( + serialized_name="aadDomains", + ) + single_sign_on_properties.enterprise_app_id = AAZStrType( + serialized_name="enterpriseAppId", + ) + single_sign_on_properties.state = AAZStrType() + single_sign_on_properties.type = AAZStrType( + flags={"required": True}, + ) + single_sign_on_properties.url = AAZStrType() + + aad_domains = cls._schema_on_200.properties.single_sign_on_properties.aad_domains + aad_domains.Element = AAZStrType() + + user = cls._schema_on_200.properties.user + user.email_address = AAZStrType( + serialized_name="emailAddress", + ) + user.first_name = AAZStrType( + serialized_name="firstName", + ) + user.last_name = AAZStrType( + serialized_name="lastName", + ) + user.phone_number = AAZStrType( + serialized_name="phoneNumber", + ) + user.upn = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/weights-and-biases/azext_weights_and_biases/azext_metadata.json b/src/weights-and-biases/azext_weights_and_biases/azext_metadata.json new file mode 100644 index 00000000000..e506328978c --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.70.0" +} \ No newline at end of file diff --git a/src/weights-and-biases/azext_weights_and_biases/commands.py b/src/weights-and-biases/azext_weights_and_biases/commands.py new file mode 100644 index 00000000000..b0d842e4993 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/commands.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +# from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): # pylint: disable=unused-argument + pass diff --git a/src/weights-and-biases/azext_weights_and_biases/custom.py b/src/weights-and-biases/azext_weights_and_biases/custom.py new file mode 100644 index 00000000000..86df1e48ef5 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/custom.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +from knack.log import get_logger + + +logger = get_logger(__name__) diff --git a/src/weights-and-biases/azext_weights_and_biases/tests/__init__.py b/src/weights-and-biases/azext_weights_and_biases/tests/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/tests/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/weights-and-biases/azext_weights_and_biases/tests/latest/__init__.py b/src/weights-and-biases/azext_weights_and_biases/tests/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/tests/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/weights-and-biases/azext_weights_and_biases/tests/latest/recordings/test_weights_and_biases_all.yaml b/src/weights-and-biases/azext_weights_and_biases/tests/latest/recordings/test_weights_and_biases_all.yaml new file mode 100644 index 00000000000..831e0218992 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/tests/latest/recordings/test_weights_and_biases_all.yaml @@ -0,0 +1,111 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - weights-and-biases instance list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.12.8 (Linux-6.8.0-1021-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/Microsoft.WeightsAndBiases/instances?api-version=2024-09-18-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/microsoft.weightsandbiases/instances/lite-test-org1","name":"lite-test-org1","type":"microsoft.weightsandbiases/instances","location":"East + US","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2024-12-17T07:22:50.0427033Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2024-12-17T07:22:50.0427033Z"},"properties":{"marketplace":{"subscriptionId":"761a923c-204d-4a37-c6ee-77dd91e0e105","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Succeeded","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt@microsoft.com","phoneNumber":""},"partnerProperties":{"region":"eastus","subdomain":"testdomain"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/microsoft.weightsandbiases/instances/wandb-lite-test-org2","name":"wandb-lite-test-org2","type":"microsoft.weightsandbiases/instances","location":"East + US","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-24T10:33:19.6120843Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-24T10:33:19.6120843Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt@microsoft.com","phoneNumber":""},"partnerProperties":{"region":"eastus","subdomain":"testdomain"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/microsoft.weightsandbiases/instances/wnb-lite-test-org3","name":"wnb-lite-test-org3","type":"microsoft.weightsandbiases/instances","location":"East + US","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-24T12:05:05.984166Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-24T12:05:05.984166Z"},"properties":{"marketplace":{"subscriptionId":"e2aafcd4-a685-49e8-db58-0eb4fb3c774f","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt@microsoft.com","phoneNumber":""},"partnerProperties":{"region":"eastus","subdomain":"testdomain2"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/microsoft.weightsandbiases/instances/wnb-lite-test-org4","name":"wnb-lite-test-org4","type":"microsoft.weightsandbiases/instances","location":"East + US","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-30T09:50:03.126718Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-30T09:50:03.126718Z"},"properties":{"marketplace":{"subscriptionId":"f83024d3-8a29-493c-c3af-1a9e6718ff1a","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt@microsoft.com","phoneNumber":""},"partnerProperties":{"region":"eastus","subdomain":"testorg4"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/Microsoft.WeightsAndBiases/instances/wnb-test-org-5","name":"wnb-test-org-5","type":"microsoft.weightsandbiases/instances","location":"eastus","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-31T11:53:13.7139846Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-31T11:53:13.7139846Z"},"properties":{"marketplace":{"subscriptionId":"03de7830-78ff-45f3-c564-58dd30bc36ca","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt_microsoft.com#EXT#@MicrosoftCustomerLed.onmicrosoft.com","phoneNumber":""},"partnerProperties":{"subdomain":"testorg5","region":"eastus"}}}]}' + headers: + cache-control: + - no-cache + content-length: + - '5058' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Mar 2025 11:20:31 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 46e88016-1dd1-44ff-9123-14687a0075bb + - 440e0295-2d60-4cf0-ac24-22f588c7036b + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 5F16D685BBFC4D64B5206812AFEDC9DC Ref B: SIN221080712005 Ref C: 2025-03-27T11:20:30Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - weights-and-biases instance show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --instancename + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.12.8 (Linux-6.8.0-1021-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/Microsoft.WeightsAndBiases/instances/wnb-test-org-5?api-version=2024-09-18-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/Microsoft.WeightsAndBiases/instances/wnb-test-org-5","name":"wnb-test-org-5","type":"microsoft.weightsandbiases/instances","location":"eastus","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-31T11:53:13.7139846Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-31T11:53:13.7139846Z"},"properties":{"marketplace":{"subscriptionId":"03de7830-78ff-45f3-c564-58dd30bc36ca","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt_microsoft.com#EXT#@MicrosoftCustomerLed.onmicrosoft.com","phoneNumber":""},"partnerProperties":{"subdomain":"testorg5","region":"eastus"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1037' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Mar 2025 11:20:33 GMT + etag: + - '"00009f31-0000-0300-0000-679cd68f0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 0522264ECF0D4BC6A441901F3261018F Ref B: SIN221080711045 Ref C: 2025-03-27T11:20:31Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/weights-and-biases/azext_weights_and_biases/tests/latest/recordings/test_weights_and_biases_rev.yaml b/src/weights-and-biases/azext_weights_and_biases/tests/latest/recordings/test_weights_and_biases_rev.yaml new file mode 100644 index 00000000000..3372463c49f --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/tests/latest/recordings/test_weights_and_biases_rev.yaml @@ -0,0 +1,111 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - weights-and-biases instance list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.12.8 (Linux-6.8.0-1021-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/Microsoft.WeightsAndBiases/instances?api-version=2024-09-18-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/microsoft.weightsandbiases/instances/lite-test-org1","name":"lite-test-org1","type":"microsoft.weightsandbiases/instances","location":"East + US","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2024-12-17T07:22:50.0427033Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2024-12-17T07:22:50.0427033Z"},"properties":{"marketplace":{"subscriptionId":"761a923c-204d-4a37-c6ee-77dd91e0e105","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Succeeded","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt@microsoft.com","phoneNumber":""},"partnerProperties":{"region":"eastus","subdomain":"testdomain"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/microsoft.weightsandbiases/instances/wandb-lite-test-org2","name":"wandb-lite-test-org2","type":"microsoft.weightsandbiases/instances","location":"East + US","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-24T10:33:19.6120843Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-24T10:33:19.6120843Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt@microsoft.com","phoneNumber":""},"partnerProperties":{"region":"eastus","subdomain":"testdomain"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/microsoft.weightsandbiases/instances/wnb-lite-test-org3","name":"wnb-lite-test-org3","type":"microsoft.weightsandbiases/instances","location":"East + US","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-24T12:05:05.984166Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-24T12:05:05.984166Z"},"properties":{"marketplace":{"subscriptionId":"e2aafcd4-a685-49e8-db58-0eb4fb3c774f","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt@microsoft.com","phoneNumber":""},"partnerProperties":{"region":"eastus","subdomain":"testdomain2"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/microsoft.weightsandbiases/instances/wnb-lite-test-org4","name":"wnb-lite-test-org4","type":"microsoft.weightsandbiases/instances","location":"East + US","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-30T09:50:03.126718Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-30T09:50:03.126718Z"},"properties":{"marketplace":{"subscriptionId":"f83024d3-8a29-493c-c3af-1a9e6718ff1a","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt@microsoft.com","phoneNumber":""},"partnerProperties":{"region":"eastus","subdomain":"testorg4"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/Microsoft.WeightsAndBiases/instances/wnb-test-org-5","name":"wnb-test-org-5","type":"microsoft.weightsandbiases/instances","location":"eastus","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-31T11:53:13.7139846Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-31T11:53:13.7139846Z"},"properties":{"marketplace":{"subscriptionId":"03de7830-78ff-45f3-c564-58dd30bc36ca","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt_microsoft.com#EXT#@MicrosoftCustomerLed.onmicrosoft.com","phoneNumber":""},"partnerProperties":{"subdomain":"testorg5","region":"eastus"}}}]}' + headers: + cache-control: + - no-cache + content-length: + - '5058' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Mar 2025 11:16:57 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 86fb3c78-cc56-4c40-ba21-866a9c890c27 + - 8bbdf178-eb03-4cde-845f-9bc552fe21d3 + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 95CDE539C79A419E93D02BD35FBE2004 Ref B: MAA201060514017 Ref C: 2025-03-27T11:16:52Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - weights-and-biases instance show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --instancename + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.12.8 (Linux-6.8.0-1021-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/Microsoft.WeightsAndBiases/instances/wnb-test-org-5?api-version=2024-09-18-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jawt-rg/providers/Microsoft.WeightsAndBiases/instances/wnb-test-org-5","name":"wnb-test-org-5","type":"microsoft.weightsandbiases/instances","location":"eastus","tags":{},"systemData":{"createdBy":"jawt@microsoft.com","createdByType":"User","createdAt":"2025-01-31T11:53:13.7139846Z","lastModifiedBy":"jawt@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-01-31T11:53:13.7139846Z"},"properties":{"marketplace":{"subscriptionId":"03de7830-78ff-45f3-c564-58dd30bc36ca","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"weightsandbiasesinc1641502883483","offerId":"wandb_liftr","planId":"liftr0plan","planName":"WandB + Liftr","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"jawt@microsoft.com","upn":"jawt_microsoft.com#EXT#@MicrosoftCustomerLed.onmicrosoft.com","phoneNumber":""},"partnerProperties":{"subdomain":"testorg5","region":"eastus"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1037' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Mar 2025 11:16:58 GMT + etag: + - '"00009f31-0000-0300-0000-679cd68f0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: F4BB9A4009F04461BF7226EE2BEF650C Ref B: MAA201060514023 Ref C: 2025-03-27T11:16:57Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/weights-and-biases/azext_weights_and_biases/tests/latest/test_weights_and_biases.py b/src/weights-and-biases/azext_weights_and_biases/tests/latest/test_weights_and_biases.py new file mode 100644 index 00000000000..2295e356303 --- /dev/null +++ b/src/weights-and-biases/azext_weights_and_biases/tests/latest/test_weights_and_biases.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from azure.cli.testsdk import * + + +class WeightsAndBiasesScenario(ScenarioTest): + @ResourceGroupPreparer(name_prefix='cli_test_weights_and_biases', location="eastus") + def test_weights_and_biases_all(self, resource_group): + self.kwargs.update({ + 'name': 'wnb-test-org-5', + 'resource_group': 'jawt-rg' + }) + + # List WeightsAndBiases Organizations + self.cmd('az weights-and-biases instance list --resource-group {resource_group}', + checks=[]) + + # Show WeightsAndBiases Organization + self.cmd('az weights-and-biases instance show --resource-group {resource_group} --instancename {name}', + checks=[ + self.check('name', '{name}'), + ]) diff --git a/src/weights-and-biases/setup.cfg b/src/weights-and-biases/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/weights-and-biases/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/weights-and-biases/setup.py b/src/weights-and-biases/setup.py new file mode 100644 index 00000000000..f307e4d2f14 --- /dev/null +++ b/src/weights-and-biases/setup.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from codecs import open +from setuptools import setup, find_packages + + +# HISTORY.rst entry. +VERSION = '1.0.0b1' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='weights-and-biases', + version=VERSION, + description='Microsoft Azure Command-Line Tools WeightsAndBiases Extension.', + long_description=README + '\n\n' + HISTORY, + license='MIT', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/main/src/weights-and-biases', + classifiers=CLASSIFIERS, + packages=find_packages(exclude=["tests"]), + package_data={'azext_weights_and_biases': ['azext_metadata.json']}, + install_requires=DEPENDENCIES +)