gpt4 book ai didi

jupyter-notebook - GPU/TPU 上的 PyCaret 方法

转载 作者:行者123 更新时间:2023-12-02 18:44:50 25 4
gpt4 key购买 nike

CPU Utilization

当我运行 best_model = compare_models() 时,CPU 内存负载很大,而我的 GPU 却未被利用。如何在 GPU 上运行 setup()compare_models()?PyCaret 中是否有内置方法?

最佳答案

只有部分机型可以在GPU上运行,必须正确安装才能使用GPU。例如,对于 xgboost,您必须使用 pip 安装它并安装 CUDA 10+(或安装来自 anaconda 的 GPU xgboost 版本等)。以下是可以使用 GPU 的估算器列表及其要求:https://pycaret.readthedocs.io/en/latest/installation.html?highlight=gpu#pycaret-on-gpu

正如 Yatin 所说,您需要在 setup() 中使用 use_gpu=True。或者您可以在创建单个模型时指定它,例如 xgboost_gpu = create_model('xgboost', fold=3, tree_method='gpu_hist', gpu_id=0)

对于安装 CUDA,我喜欢使用 Anaconda,因为它很容易,例如 conda install -c anaconda cudatoolkit。看起来对于非增强方法,您需要安装 cuML 以供 GPU 使用。

哦,看起来 pycaret 不能将 tune-sklearn 与 GPU 一起使用(在 tune_model 文档部分底部的警告 here 中)。

关于jupyter-notebook - GPU/TPU 上的 PyCaret 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67579616/

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