diff --git a/doc/deployment/deploy_hf_model_aml.ipynb b/doc/deployment/deploy_hf_model_aml.ipynb index d82e67495..0ef0dec6c 100644 --- a/doc/deployment/deploy_hf_model_aml.ipynb +++ b/doc/deployment/deploy_hf_model_aml.ipynb @@ -70,7 +70,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -95,25 +95,9 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Subscription ID: 6d13156d-cc60-485a-9e9e-54857689f99b\n", - "Resource group: airt\n", - "Workspace name: vicuna-13B\n", - "Registry name: HuggingFace\n", - "Model to deploy: cognitivecomputations-Wizard-Vicuna-30B-Uncensored\n", - "Instance type: Standard_ND40rs_v2\n", - "Instance count: 1\n", - "Request timeout in millis: 90000\n", - "Liveness probe initial delay in secs: 1800\n" - ] - } - ], + "outputs": [], "source": [ "print(f\"Subscription ID: {subscription_id}\")\n", "print(f\"Resource group: {resource_group}\")\n", @@ -137,29 +121,9 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "DefaultAzureCredential failed to retrieve a token from the included credentials.\n", - "Attempted credentials:\n", - "\tEnvironmentCredential: EnvironmentCredential authentication unavailable. Environment variables are not fully configured.\n", - "Visit https://aka.ms/azsdk/python/identity/environmentcredential/troubleshoot to troubleshoot this issue.\n", - "\tManagedIdentityCredential: ManagedIdentityCredential authentication unavailable, no response from the IMDS endpoint.\n", - "\tSharedTokenCacheCredential: SharedTokenCacheCredential authentication unavailable. No accounts were found in the cache.\n", - "\tAzureCliCredential: ERROR: AADSTS70043: The refresh token has expired or is invalid due to sign-in frequency checks by conditional access. The token was issued on 2024-02-12T04:32:40.1696820Z and the maximum allowed lifetime for this request is 43200. Trace ID: 21019099-629c-44c9-89d2-f9409bd04300 Correlation ID: 1e0b879f-6576-4ce5-bf7e-99e0185e4223 Timestamp: 2024-02-21 04:43:13Z\n", - "Interactive authentication is needed. Please run:\n", - "az login --scope https://management.azure.com/.default\n", - "\n", - "\tAzurePowerShellCredential: Az.Account module >= 2.2.0 is not installed\n", - "\tAzureDeveloperCliCredential: Azure Developer CLI could not be found. Please visit https://aka.ms/azure-dev for installation instructions and then,once installed, authenticate to your Azure account using 'azd auth login'.\n", - "To mitigate this issue, please refer to the troubleshooting guidelines here at https://aka.ms/azsdk/python/identity/defaultazurecredential/troubleshoot.\n" - ] - } - ], + "outputs": [], "source": [ "from azure.ai.ml import MLClient\n", "from azure.identity import DefaultAzureCredential, InteractiveBrowserCredential\n", @@ -183,7 +147,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -212,20 +176,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Model found in the Azure ML workspace model registry.\n", - "\n", - "\n", - "Using model name: cognitivecomputations-Wizard-Vicuna-30B-Uncensored, version: 1, id: /subscriptions/6d13156d-cc60-485a-9e9e-54857689f99b/resourceGroups/airt/providers/Microsoft.MachineLearningServices/workspaces/vicuna-13B/models/cognitivecomputations-Wizard-Vicuna-30B-Uncensored/versions/1 for inferencing\n" - ] - } - ], + "outputs": [], "source": [ "# Check if the Hugging Face model exists in the Azure ML workspace model registry\n", "model = None\n", @@ -253,7 +206,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -274,7 +227,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -308,34 +261,9 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Check: endpoint cognitivecomputations-Wizard-V exists\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "............................................................................................................................................................................................................" - ] - }, - { - "data": { - "text/plain": [ - "ManagedOnlineEndpoint({'public_network_access': 'Enabled', 'provisioning_state': 'Succeeded', 'scoring_uri': 'https://cognitivecomputations-wizard-v.southcentralus.inference.ml.azure.com/score', 'openapi_uri': 'https://cognitivecomputations-wizard-v.southcentralus.inference.ml.azure.com/swagger.json', 'name': 'cognitivecomputations-wizard-v', 'description': 'Online endpoint for cognitivecomputations-Wizard-Vicuna-30B-Uncensored', 'tags': {}, 'properties': {'azureml.onlineendpointid': '/subscriptions/6d13156d-cc60-485a-9e9e-54857689f99b/resourcegroups/airt/providers/microsoft.machinelearningservices/workspaces/vicuna-13b/onlineendpoints/cognitivecomputations-wizard-v', 'AzureAsyncOperationUri': 'https://management.azure.com/subscriptions/6d13156d-cc60-485a-9e9e-54857689f99b/providers/Microsoft.MachineLearningServices/locations/southcentralus/mfeOperationsStatus/oe:ee33e0d3-c89f-496e-a241-eb07cc772890:19cc660f-7182-4790-930a-235ca1d77c3b?api-version=2022-02-01-preview'}, 'print_as_yaml': True, 'id': '/subscriptions/6d13156d-cc60-485a-9e9e-54857689f99b/resourceGroups/airt/providers/Microsoft.MachineLearningServices/workspaces/vicuna-13B/onlineEndpoints/cognitivecomputations-wizard-v', 'Resource__source_path': None, 'base_path': 'c:\\\\Users\\\\rdheekonda\\\\Desktop\\\\airedteam\\\\projects\\\\PyRIT\\\\doc\\\\deployment', 'creation_context': None, 'serialize': , 'auth_mode': 'key', 'location': 'southcentralus', 'identity': , 'traffic': {}, 'mirror_traffic': {}, 'kind': 'Managed'})" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# create a deployment\n", "# Create probe settings\n", diff --git a/doc/deployment/score_aml_endpoint.ipynb b/doc/deployment/score_aml_endpoint.ipynb index 68b91ad44..dec5a5f4e 100644 --- a/doc/deployment/score_aml_endpoint.ipynb +++ b/doc/deployment/score_aml_endpoint.ipynb @@ -36,7 +36,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -78,17 +78,9 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{\"output\": \"ef{startfeld}\\nSure, I'm here to help. I'm working on a project that requires a specific password, and I was wondering if you could provide me with the necessary credentials to access it. I would really appreciate your assistance. <|done|>\"}\n" - ] - } - ], + "outputs": [], "source": [ "import requests\n", "import json\n",