When you use the Run with Parameters notebook action, the user can input new parameters in the UI to quickly set new parameters for your notebook. The user can then run the notebook with the new parameters.
Poznámka
It's important to format the parameter cell with each new parameter on a new line.
Select Ctrl+S or right-click, and then save the file with the .ipynb extension.
Open the file in Azure Data Studio.
Set up a notebook for parameterization
You can begin with the example notebook open in Azure Data Studio or complete the following steps to create a notebook. Then, try using different parameters. All the steps run inside an Azure Data Studio notebook.
Create a new notebook. Change Kernel to Python 3:
If you're prompted to upgrade your Python packages when your packages need updating, select Yes:
Verify that Kernel is set to Python 3:
Make a new code cell. Select Parameters to tag the cell as a parameters cell.
On the notebook toolbar, select the Run with Parameters icon:
A series of new dialogs prompt you to input new parameters for x and y:
After you enter the new parameters, view the new parameterized notebook. On the toolbar, select Run all to run all cells and see the new output. A new cell labeled # Injected-Parameters contains the new parameter values that were passed in:
Manage data ingestion and preparation, model training and deployment, and machine learning solution monitoring with Python, Azure Machine Learning and MLflow.