Skip to content

Commit 716ca67

Browse files
authored
Merge pull request #99407 from liakaz/liakaz/troubleshoot_guide_update
Changes to trouble shooting guide: using Environment
2 parents fc23f71 + 2ccb0bf commit 716ca67

File tree

4 files changed

+68
-183
lines changed

4 files changed

+68
-183
lines changed

articles/machine-learning/how-to-enable-logging.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,6 @@ compute_target = ComputeTarget.attach(
7878
compute.wait_for_completion(show_output=True)
7979
```
8080

81-
## Logging during image creation
82-
83-
Enabling logging during image creation will allow you to see any errors during the build process. Set the `show_output` param on the `wait_for_deployment()` function.
84-
85-
```python
86-
from azureml.core.webservice import Webservice
87-
88-
service = Webservice.deploy_from_image(deployment_config=your_config,
89-
image=image,
90-
name="example-image",
91-
workspace=ws
92-
)
93-
94-
service.wait_for_deployment(show_output=True)
95-
```
96-
9781
## Logging for deployed models
9882

9983
To retrieve logs from a previously deployed web service, load the service and use the `get_logs()` function. The logs may contain detailed information about any errors that occurred during deployment.

articles/machine-learning/how-to-setup-authentication.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ ws.get_details()
165165

166166
The service principal created in the steps above can also be used to authenticate to the Azure Machine Learning [REST API](https://docs.microsoft.com/rest/api/azureml/). You use the Azure Active Directory [client credentials grant flow](https://docs.microsoft.com/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow), which allow service-to-service calls for headless authentication in automated workflows. The examples are implemented with the [ADAL library](https://docs.microsoft.com/azure/active-directory/develop/active-directory-authentication-libraries) in both Python and Node.js, but you can also use any open-source library that supports OpenID Connect 1.0.
167167

168-
> ![NOTE]
168+
> [!NOTE]
169169
> MSAL.js is a newer library than ADAL, but you cannot do service-to-service authentication using client credentials with MSAL.js, since it is primarily a client-side library intended
170170
> for interactive/UI authentication tied to a specific user. We recommend using ADAL as shown below to build automated workflows with the REST API.
171171
@@ -265,15 +265,19 @@ aci_config = AciWebservice.deploy_configuration(cpu_cores = 1,
265265
auth_enable=True)
266266
```
267267

268-
Then you can use the custom ACI configuration in deployment using the parent `WebService` class.
268+
Then you can use the custom ACI configuration in deployment using the `Model` class.
269269

270270
```python
271-
from azureml.core.webservice import Webservice
271+
from azureml.core.model import Model, InferenceConfig
272+
272273

273-
aci_service = Webservice.deploy_from_image(deployment_config=aci_config,
274-
image=image,
275-
name="aci_service_sample",
276-
workspace=ws)
274+
inference_config = InferenceConfig(entry_script="score.py",
275+
environment=myenv)
276+
aci_service = Model.deploy(workspace=ws,
277+
name="aci_service_sample",
278+
models=[model],
279+
inference_config=inference_config,
280+
deployment_config=aci_config)
277281
aci_service.wait_for_deployment(True)
278282
```
279283

@@ -315,4 +319,4 @@ print(token)
315319
## Next steps
316320

317321
* [Train and deploy an image classification model](tutorial-train-models-with-aml.md).
318-
* [Consume an Azure Machine Learning model deployed as a web service](how-to-consume-web-service.md).
322+
* [Consume an Azure Machine Learning model deployed as a web service](how-to-consume-web-service.md).

0 commit comments

Comments
 (0)