Skip to content

Commit 72dffbc

Browse files
20240529 edit pass
1 parent 15ccbfa commit 72dffbc

12 files changed

Lines changed: 107 additions & 107 deletions

‎docs/machine-learning/install/sql-pretrained-models-install.md‎

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ ms.date: 05/29/2024
77
ms.service: sql
88
ms.subservice: machine-learning-services
99
ms.topic: how-to
10-
ms.custom: intro-installation
10+
ms.custom:
11+
- intro-installation
1112
monikerRange: "=sql-server-2016||=sql-server-2017||=sql-server-ver15||=sql-server-linux-ver15"
1213
---
1314
# Install pre-trained machine learning models on SQL Server
1415

1516
[!INCLUDE [SQL Server 2016 2017 2019](../../includes/applies-to-version/sqlserver2016-2019-only.md)]
1617

17-
This article applies to [!INCLUDE[sssql16-md](../../includes/sssql16-md.md)], [!INCLUDE[sssql17-md](../../includes/sssql17-md.md)], and [!INCLUDE[sssql19-md](../../includes/sssql19-md.md)].
18+
This article applies to [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)], [!INCLUDE [sssql17-md](../../includes/sssql17-md.md)], and [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)].
1819

1920
This article explains how to use PowerShell to add free pre-trained machine learning models for *sentiment analysis* and *image featurization* to a SQL Server instance having R or Python integration. The pre-trained models are built by Microsoft and ready-to-use, added to an instance as a post-install task. For more information about these models, see the [Resources](#bkmk_resources) section of this article.
2021

@@ -48,7 +49,7 @@ Download and install the latest cumulative update for your version of SQL Server
4849
::: moniker range="=sql-server-2016"
4950
[MicrosoftML R package](../r/ref-r-microsoftml.md) contain the pre-trained models.
5051

51-
[SQL Server R Services](sql-r-services-windows-install.md), which is R only, does not include [MicrosoftML package](../r/ref-r-microsoftml.md) out of the box. To add MicrosoftML, you must do a [component upgrade](../install/upgrade-r-and-python.md). One advantage of the component upgrade is that you can simultaneously add the pre-trained models, which makes running the PowerShell script unnecessary. However, if you already upgraded but missed adding the pre-trained models the first time around, you can run the PowerShell script as described in this article. It works for both versions of SQL Server. Before you do, confirm that the MicrosoftML library exists at `C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\R_SERVICES\library`.
52+
[SQL Server R Services](sql-r-services-windows-install.md), which is R only, does not include [MicrosoftML package](../r/ref-r-microsoftml.md) out of the box. To add MicrosoftML, you must do a [component upgrade](upgrade-r-and-python.md). One advantage of the component upgrade is that you can simultaneously add the pre-trained models, which makes running the PowerShell script unnecessary. However, if you already upgraded but missed adding the pre-trained models the first time around, you can run the PowerShell script as described in this article. It works for both versions of SQL Server. Before you do, confirm that the MicrosoftML library exists at `C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\R_SERVICES\library`.
5253
::: moniker-end
5354

5455
<a name="file-location"></a>
@@ -79,13 +80,13 @@ Visit [https://aka.ms/mlm4sql](https://aka.ms/mlm4sql) to download the file **In
7980
## Execute with elevated privileges
8081

8182
1. Start PowerShell. On the task bar, right-click the PowerShell program icon and select **Run as administrator**.
82-
2. The recommended execution policy during installation is "RemoteSigned". For more information on setting the PowerShell execution policy, see [Set-ExecutionPolicy](/powershell/module/microsoft.powershell.security/set-executionpolicy). For example:
83+
1. The recommended execution policy during installation is "RemoteSigned". For more information on setting the PowerShell execution policy, see [Set-ExecutionPolicy](/powershell/module/microsoft.powershell.security/set-executionpolicy). For example:
8384

8485
```powershell
8586
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
8687
```
8788

88-
3. Enter a fully-qualified path to the installation script file and include the instance name. Assuming the Downloads folder and a default instance, the command might look like this:
89+
1. Enter a fully-qualified path to the installation script file and include the instance name. Assuming the Downloads folder and a default instance, the command might look like this:
8990

9091
```powershell
9192
PS C:\WINDOWS\system32> C:\Users\<user-name>\Downloads\Install-MLModels.ps1 MSSQLSERVER
@@ -113,9 +114,9 @@ First, check for the new files in the [mxlibs folder](#file-location). Next, run
113114

114115
### R verification steps
115116

116-
1. Start **RGUI.EXE** at C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\R_SERVICES\bin\x64.
117+
1. Start **RGUI.EXE** at `C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\R_SERVICES\bin\x64`.
117118

118-
2. Paste in the following R script at the command prompt.
119+
1. Paste in the following R script at the command prompt.
119120

120121
```R
121122
# Create the data
@@ -137,7 +138,7 @@ First, check for the new files in the [mxlibs folder](#file-location). Next, run
137138
sentimentScores
138139
```
139140

140-
3. Press Enter to view the sentiment scores. Output should be as follows:
141+
1. Press **Enter** to view the sentiment scores. Output should be as follows:
141142

142143
```R
143144
> sentimentScores
@@ -153,9 +154,9 @@ First, check for the new files in the [mxlibs folder](#file-location). Next, run
153154

154155
### Python verification steps
155156

156-
1. Start **Python.exe** at C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES.
157+
1. Start **Python.exe** at `C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\PYTHON_SERVICES`.
157158

158-
2. Paste in the following Python script at the command prompt
159+
1. Paste in the following Python script at the command prompt.
159160

160161
```python
161162
import numpy
@@ -179,7 +180,7 @@ First, check for the new files in the [mxlibs folder](#file-location). Next, run
179180
print(sentiment_scores)
180181
```
181182

182-
3. Press Enter to print the scores. Output should be as follows:
183+
1. Press Enter to print the scores. Output should be as follows:
183184

184185
```python
185186
>>> print(sentiment_scores)
@@ -203,7 +204,7 @@ The following link include example code invoking the pretrained models.
203204
204205
## Research and resources
205206
206-
Currently the models that are available are deep neural network (DNN) models for sentiment analysis and image classification. All pre-trained models were trained by using Microsoft's [Computation Network Toolkit](https://cntk.ai/Features/Index.html), or **CNTK**.
207+
Currently the models that are available are deep neural network (DNN) models for sentiment analysis and image classification. All pre-trained models were trained by using Microsoft's [Computation Network Toolkit](https://cntk.azurewebsites.net/Features/Index.html), or **CNTK**.
207208

208209
The configuration of each network was based on the following reference implementations:
209210

@@ -214,13 +215,13 @@ The configuration of each network was based on the following reference implement
214215

215216
For more information about the algorithms used in these deep learning models, and how they are implemented and trained using CNTK, see these articles:
216217

217-
+ [Microsoft Researchers' Algorithm Sets ImageNet Challenge Milestone](https://www.microsoft.com/research/blog/microsoft-researchers-algorithm-sets-imagenet-challenge-milestone/)
218+
+ [Microsoft Researchers' Algorithm Sets ImageNet Challenge Milestone](https://www.microsoft.com/research/blog/microsoft-researchers-algorithm-sets-imagenet-challenge-milestone)
218219
219-
+ [Microsoft Computational Network Toolkit offers most efficient distributed deep learning computational performance](https://www.microsoft.com/research/blog/microsoft-computational-network-toolkit-offers-most-efficient-distributed-deep-learning-computational-performance/)
220+
+ [Microsoft Computational Network Toolkit offers most efficient distributed deep learning computational performance](https://www.microsoft.com/research/blog/microsoft-computational-network-toolkit-offers-most-efficient-distributed-deep-learning-computational-performance)
220221
221-
## See also
222+
## Related content
222223
223-
+ [SQL Server Machine Learning Services](sql-machine-learning-services-windows-install.md)
224-
+ [Upgrade R and Python components in SQL Server instances](../install/upgrade-r-and-python.md)
225-
+ [MicrosoftML package for R](../r/ref-r-microsoftml.md)
226-
+ [microsoftml package for Python](../python/ref-py-microsoftml.md)
224+
- [SQL Server Machine Learning Services](sql-machine-learning-services-windows-install.md)
225+
- [Upgrade R and Python components in SQL Server instances](upgrade-r-and-python.md)
226+
- [MicrosoftML package for R](../r/ref-r-microsoftml.md)
227+
- [microsoftml package for Python](../python/ref-py-microsoftml.md)

docs/machine-learning/python/media/jupyter-notebook-local-revo.png renamed to docs/machine-learning/python/media/setup-python-client-tools-sql/jupyter-notebook-local-revo.png

File renamed without changes.

docs/machine-learning/python/media/jupyter-notebook-new-p3.png renamed to docs/machine-learning/python/media/setup-python-client-tools-sql/jupyter-notebook-new-p3.png

File renamed without changes.

docs/machine-learning/python/media/jupyter-notebook-python-registration.png renamed to docs/machine-learning/python/media/setup-python-client-tools-sql/jupyter-notebook-python-registration.png

File renamed without changes.

docs/machine-learning/python/media/jupyter-notebook-scatterplot.png renamed to docs/machine-learning/python/media/setup-python-client-tools-sql/jupyter-notebook-scatterplot.png

File renamed without changes.

docs/machine-learning/python/media/powershell-python-exe.png renamed to docs/machine-learning/python/media/setup-python-client-tools-sql/powershell-python-exe.png

File renamed without changes.

docs/machine-learning/python/media/sqlmls-python-client-revo.png renamed to docs/machine-learning/python/media/setup-python-client-tools-sql/sqlmls-python-client-revo.png

File renamed without changes.

0 commit comments

Comments
 (0)