AzureMLNotebookHandler Class
Represents a Papermill-based notebook execution handler.
Papermill is a tool for parameterizing and executing Jupyter notebooks.
Construct PapermillExecutionHandler object.
- Inheritance
-
azureml.contrib.notebook._notebook_handler.NotebookExecutionHandlerAzureMLNotebookHandler
Constructor
AzureMLNotebookHandler(history=True, timeout=None, **kwargs)
Parameters
Name | Description |
---|---|
history
|
Whether to enable metrics logs to run history. The default is True. default value: True
|
timeout
|
The cell execution timeout in seconds. default value: None
|
kwargs
Required
|
A dictionary of optional parameters. See supported_options. |
Remarks
# Import dependencies
from azureml.core import Workspace, Experiment, RunConfiguration
from azureml.contrib.notebook import NotebookRunConfig, AzureMLNotebookHandler
# Create new experiment
workspace = Workspace.from_config()
exp = Experiment(workspace, "azureml_notebook_experiment")
# Customize run configuration to execute in user managed environment
run_config_user_managed = RunConfiguration()
run_config_user_managed.environment.python.user_managed_dependencies = True
# Instante AzureML notebook handler with cell execution timeout
handler = AzureMLNotebookHandler(timeout=600, progress_bar=False)
# Create notebook run configuration
cfg = NotebookRunConfig(source_directory="./notebooks",
notebook="notebook-sample.ipynb",
handler=handler,
run_config=run_config_user_managed)
# Submit experiment and wait for completion
run = exp.submit(cfg)
run.wait_for_completion(show_output=True)
Attributes
supported_options
supported_options = ['progress_bar', 'log_output', 'kernel_name', 'cwd']
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for