gpt4 book ai didi

python - 使用Azure机器学习服务训练大型模型时如何克服TrainingException?

转载 作者:行者123 更新时间:2023-12-01 01:04:16 25 4
gpt4 key购买 nike

我正在训练一个大型模型,试图用于此目的 Azure Machine Learning service在 Azure 笔记本中。

因此,我创建了一个估计器来进行本地训练:

from azureml.train.estimator import Estimator

estimator = Estimator(source_directory='./source_dir',
compute_target='local',
entry_script='train.py')

(我的train.py应该从一个大的词向量文件开始加载和训练)。

当运行

run = experiment.submit(config=estimator)

我明白

TrainingException:

====================================================================

While attempting to take snapshot of /data/home/username/notebooks/source_dir Your total snapshot size exceeds the limit of 300.0 MB. Please see http://aka.ms/aml-largefiles on how to work with large files.

====================================================================

错误中提供的链接可能是 broken 。我的 ./source_dir 中的内容确实超过了 300 MB。
我该如何解决这个问题?

最佳答案

您可以将训练文件放在 source_dir 之外,这样它们就不会作为提交实验的一部分而上传,然后将它们单独上传到数据存储(基本上使用 Azure 存储)与您的工作空间关联)。然后您需要做的就是引用 train.py 中的训练文件。

请参阅Train model tutorial有关如何将数据上传到数据存储然后从训练文件访问它的示例。

关于python - 使用Azure机器学习服务训练大型模型时如何克服TrainingException?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55525445/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com