我目前正在“ml.t3.2xlarge”实例上的 amazon sagemaker jupyter 笔记本(不是 jupyterLab,只是一个普通的 jupyter 笔记本)上运行代码。下面显示了一行代码,我只是在我的数据框架上部署了 LLM。但由于数据帧很大,因此该行代码在“ml.t3.2xlarge”上运行速度非常慢。我想确保这行代码在“ml.p3.2xlarge”上运行,并将结果存储回 S3 中。
df_new['predicted_values'] = df_original.progress_apply(lambda x: LLM_pretrained_model.predict( x['comment_body'] )
如何在另一个实例中运行这个单元格?
更改实例将取决于您使用的 SageMaker 组件:
1/ Studio 经典版:https://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-run-and-manage-switch-instance-type.html
3/笔记本实例 - 更新实例类型:https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-update.html