GPU/TPU 上的 PyCaret 方法

LIT*_*nce 4 cpu gpu jupyter-notebook kaggle pycaret

CPU利用率

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

wor*_*ise 6

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

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

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

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