AzureMLNotebookHandler 类
表示基于 Papermill 的笔记本执行处理程序。
Papermill 是一种用于参数化和执行 Jupyter 笔记本的工具。
- 继承
-
azureml.contrib.notebook._notebook_handler.NotebookExecutionHandlerAzureMLNotebookHandler
构造函数
AzureMLNotebookHandler(history=True, timeout=None, **kwargs)
参数
注解
# 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)
属性
supported_options
supported_options = ['progress_bar', 'log_output', 'kernel_name', 'cwd']
反馈
提交和查看相关反馈