簡體   English   中英

Azure ML Studio ML 管道 - 異常:未找到臨時文件

[英]Azure ML Studio ML Pipeline - Exception: No temp file found

我已經成功運行了一個 ML Pipeline 實驗,並毫無問題地發布了 Azure ML Pipeline。 當我在成功運行並發布后直接運行以下命令時(即我正在使用 Jupyter 運行所有單元格),測試失敗!

interactive_auth = InteractiveLoginAuthentication()
auth_header = interactive_auth.get_authentication_header()

rest_endpoint = published_pipeline.endpoint
response = requests.post(rest_endpoint, 
                         headers=auth_header, 
                         json={"ExperimentName": "***redacted***",
                               "ParameterAssignments": {"process_count_per_node": 6}})
run_id = response.json()["Id"]

這是 azureml-logs/70_driver_log.txt 中的錯誤:

[2020-12-10T17:17:50.124303] The experiment failed. Finalizing run...
Cleaning up all outstanding Run operations, waiting 900.0 seconds
3 items cleaning up...
Cleanup took 0.20258069038391113 seconds
Traceback (most recent call last):
  File "driver/amlbi_main.py", line 48, in <module>
    main()
  File "driver/amlbi_main.py", line 44, in main
    JobStarter().start_job()
  File "/mnt/batch/tasks/shared/LS_root/jobs/***redacted***/azureml/***redacted***/mounts/workspaceblobstore/azureml/***redacted***/driver/job_starter.py", line 52, in start_job
    job.start()
  File "/mnt/batch/tasks/shared/LS_root/jobs/***redacted***/azureml/***redacted***/mounts/workspaceblobstore/azureml/***redacted***/driver/job.py", line 105, in start
    master.wait()
  File "/mnt/batch/tasks/shared/LS_root/jobs/***redacted***/azureml/***redacted***/mounts/workspaceblobstore/azureml/***redacted***/driver/master.py", line 301, in wait
    file_helper.start()
  File "/mnt/batch/tasks/shared/LS_root/jobs/***redacted***/azureml/***redacted***/mounts/workspaceblobstore/azureml/***redacted***/driver/file_helper.py", line 206, in start
    self.analyze_source()
  File "/mnt/batch/tasks/shared/LS_root/jobs/***redacted***/azureml/***redacted***/mounts/workspaceblobstore/azureml/***redacted***/driver/file_helper.py", line 69, in analyze_source
    raise Exception(message)
Exception: No temp file found. The job failed. A job should generate temp files or should fail before this. Please check logs for the cause.

例外:找不到臨時文件。 作業失敗。 作業應生成臨時文件或在此之前失敗。 請檢查日志以了解原因。

以下是 logs/sys/warning.txt 中的錯誤:

requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://eastus.experiments.azureml.net/execution/v1.0/subscriptions/***redacted***/resourceGroups/***redacted***/providers/Microsoft.MachineLearningServices/workspaces/***redacted***/experiments/***redacted-experiment-name***/runs/***redacted-run-id***/telemetry

[...]

requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url:

與相同的 URL。

下一個...

當我等待幾分鍾並重新運行以下代碼/單元格時。

interactive_auth = InteractiveLoginAuthentication()
auth_header = interactive_auth.get_authentication_header()

rest_endpoint = published_pipeline.endpoint
response = requests.post(rest_endpoint, 
                         headers=auth_header, 
                         json={"ExperimentName": "***redacted***",
                               "ParameterAssignments": {"process_count_per_node": 2}})
run_id = response.json()["Id"]

順利完成?? 嗯? 我在這里更改了進程計數,但我認為這沒有什么區別)。 此外,日志中沒有用戶錯誤。

關於這里可能發生什么的任何想法?

提前感謝您提供的任何見解,並祝您編碼愉快::)

========== 更新#1:==========

在 1 個文件上運行約 300k 行。 有時這項工作有效,有時則無效。 我們已經嘗試了許多具有不同配置設置的版本,都會不時導致失敗。 將 sklearn 模型更改為使用 n_jobs=1。 我們正在對 NLP 工作的文本數據進行評分。

default_ds = ws.get_default_datastore()

# output dataset
output_dir = OutputFileDatasetConfig(destination=(def_file_store, 'model/results')).register_on_complete(name='model_inferences')

# location of scoring script
experiment_folder = 'model_pipeline'    

rit = 60*60*24

parallel_run_config = ParallelRunConfig(
    source_directory=experiment_folder,
    entry_script="score.py",
    mini_batch_size="5",
    error_threshold=10,
    output_action="append_row",
    environment=batch_env,
    compute_target=compute_target,
    node_count=5,
    run_invocation_timeout=rit,
    process_count_per_node=1
)

我們的下一個測試將是 - 將每一行數據放入自己的文件中。 我只嘗試了 30 行,即 30 個文件,每個文件有 1 條記錄用於評分,但仍然得到相同的錯誤。 這次我將錯誤閾值更改為 1。

2020-12-17 02:26:16,721|ParallelRunStep.ProgressSummary|INFO|112|The ParallelRunStep processed all mini batches. There are 6 mini batches with 30 items. Processed 6 mini batches containing 30 items, 30 succeeded, 0 failed. The error threshold is 1. 
2020-12-17 02:26:16,722|ParallelRunStep.Telemetry|INFO|112|Start concatenating.
2020-12-17 02:26:17,202|ParallelRunStep.FileHelper|ERROR|112|No temp file found. The job failed. A job should generate temp files or should fail before this. Please check logs for the cause.
2020-12-17 02:26:17,368|ParallelRunStep.Telemetry|INFO|112|Run status: Running
2020-12-17 02:26:17,495|ParallelRunStep.Telemetry|ERROR|112|Exception occurred executing job: No temp file found. The job failed. A job should generate temp files or should fail before this. Please check logs for the cause..
Traceback (most recent call last):
  File "/mnt/batch/tasks/shared/LS_root/jobs/**redacted**/mounts/workspaceblobstore/azureml/**redacted**/driver/job.py", line 105, in start
    master.wait()
  File "/mnt/batch/tasks/shared/LS_root/jobs/**redacted**/mounts/workspaceblobstore/azureml/**redacted**/driver/master.py", line 301, in wait
    file_helper.start()
  File "/mnt/batch/tasks/shared/LS_root/jobs/**redacted**/mounts/workspaceblobstore/azureml/**redacted**/driver/file_helper.py", line 206, in start
    self.analyze_source()
  File "/mnt/batch/tasks/shared/LS_root/jobs/**redacted**/mounts/workspaceblobstore/azureml/**redacted**/driver/file_helper.py", line 69, in analyze_source
    raise Exception(message)
Exception: No temp file found. The job failed. A job should generate temp files or should fail before this. Please check logs for the cause.

在它完成的回合中,只返回一些記錄。 一次返回的記錄數我認為是 25 或 23,另一次是 15。

========== 更新 #2:12/17/2020 ==========

我刪除了我的一個模型(我的 model 是 15 個模型的重量混合)。 我什至清理了我的文本字段,刪除了所有的制表符、換行符和逗號。 現在我正在為 30 個文件評分,每個文件有 1 條記錄,有時工作會完成,但它不會返回 30 條記錄。 其他時候它返回一個錯誤,並且仍然得到“沒有找到臨時文件”錯誤。

我想我可能已經回答了我自己的問題。 我認為問題在於

OutputFileDatasetConfig

一旦我切換回使用

PipelineData

一切又開始工作了。 我猜 Azure 當他們說 OutputFileDatasetConfig 仍處於試驗階段時並不是在開玩笑。

我仍然不明白的是,我們應該如何在沒有 OutputFileDatasetConfig 的情況下從數據工廠管道中獲取 ML Studio 管道的結果? PipelineData 根據子步驟運行 ID 將結果輸出到文件夾中,那么數據工廠應該如何知道從哪里獲取結果呢? 很想聽聽任何人可能有的任何反饋。 謝謝:)

== 更新 ==

要從數據工廠管道中獲取 ML Studio 管道的結果,請查看從數據工廠管道中的ML Studio 管道中獲取結果

== 更新 #2 ==

https://github.com/Azure/azure-sdk-for-python/issues/16568#issuecomment-781526789

嗨@yeamusic21,感謝您的反饋,在當前版本中,OutputDatasetConfig 無法與 ParallelRunStep 一起使用,我們正在努力修復它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM