【发布时间】:2020-04-18 09:41:58
【问题描述】:
简短的故事是,当我尝试从 jupyter 笔记本提交 azure ML 管道运行(azure ML 管道,而不是 Azure 管道)时,我得到PermissionError:[Errno 13] 权限被拒绝:'.\NTUSER.DAT'。更多详情:
相关代码:
from azureml.train.automl import AutoMLConfig
from azureml.train.automl.runtime import AutoMLStep
automl_settings = {
"iteration_timeout_minutes": 20,
"experiment_timeout_minutes": 30,
"n_cross_validations": 3,
"primary_metric": 'r2_score',
"preprocess": True,
"max_concurrent_iterations": 3,
"max_cores_per_iteration": -1,
"verbosity": logging.INFO,
"enable_early_stopping": True,
'time_column_name': "DateTime"
}
automl_config = AutoMLConfig(task = 'forecasting',
debug_log = 'automl_errors.log',
path = ".",
compute_target=compute_target,
run_configuration=conda_run_config,
training_data = financeforecast_dataset,
label_column_name = 'TotalUSD',
**automl_settings
)
automl_step = AutoMLStep(
name='automl_module',
automl_config=automl_config,
allow_reuse=False)
training_pipeline = Pipeline(
description="training_pipeline",
workspace=ws,
steps=[automl_step])
training_pipeline_run = Experiment(ws, 'test').submit(training_pipeline)
training_pipeline 步骤运行了 apx 20 秒,然后我得到一个很长的跟踪,结束于:
~\AppData\Local\Continuum\anaconda2\envs\forecasting\lib\site-
packages\azureml\pipeline\core\_module_builder.py in _hash_from_file_paths(hash_src)
100 hasher = hashlib.md5()
101 for f in hash_src:
--> 102 with open(str(f), 'rb') as afile:
103 buf = afile.read()
104 hasher.update(buf)
PermissionError: [Errno 13] Permission denied: '.\\NTUSER.DAT'
根据Azure's docs on this topic,提交管道会上传您指定的“源目录”的“快照”。最初,我没有指定源目录,所以为了测试它,我添加了:
default_source_directory="testing",
作为 training_pipeline 对象的参数,但是当我尝试运行它时看到了相同的行为。不确定这是否与文档所指的源目录相同。文档还说,如果没有指定源目录,则上传“当前本地目录”。我使用 print (os.getcwd()) 来获取工作目录并授予“Everyone”对该目录的完全控制权限(在 windows 环境中工作)。
前面的所有代码都可以正常工作,如果我使用 ScriptRunConfig 并在附加的计算上运行它而不是使用管道/训练集群,我可以提交一个实验。
有什么想法吗?提前感谢任何试图提供帮助的人。附言没有“azure-machine-learning-pipelines”标签,我也无法添加,因为我没有足够的声望点。别人虽然可以! General 关于它们的信息。
【问题讨论】:
标签: python azure azure-machine-learning-studio automl