首页 > 编程语言 >python lightgbm gpu版本,启动!

python lightgbm gpu版本,启动!

时间:2024-08-21 14:37:03浏览次数:12  
标签:Info ... lightgbm LightGBM python gpu packages 10

  • 环境
    • Ubuntu 20.04.2
    • Python 3.8.10
    • Nvidia-smi driver 535.104.05
    • cuda 12.2
    • torch 1.13.1+cu116(torch cuda 11.6)
  • 步骤
    • >  python3 -m pip install --upgrade pip
      ...
      
      Installing collected packages: pip
      
      Successfully installed pip-24.2
      >  pip3 install lightgbm --upgrade
      Defaulting to user installation because normal site-packages is not writeable
      Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
      Requirement already satisfied: lightgbm in /usr/local/lib/python3.8/dist-packages (3.1.1)
      Collecting lightgbm
      Downloading https://pypi.tuna.tsinghua.edu.cn/packages/4e/19/1b928cad70a4e1a3e2c37d5417ca2182510f2451eaadb6c91cd9ec692cae/lightgbm-4.5.0-py3-none-manylinux_2_28_x86_64.whl (3.6 MB)
      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 20.2 MB/s eta 0:00:00
      Requirement already satisfied: numpy>=1.17.0 in /usr/local/lib/python3.8/dist-packages (from lightgbm) (1.19.5)
      Requirement already satisfied: scipy in /usr/local/lib/python3.8/dist-packages (from lightgbm) (1.10.1)
      Installing collected packages: lightgbm
      Successfully installed lightgbm-4.5.0
  •  测试
    • >  python3
      Python 3.8.10 (default, Jul 29 2024, 17:02:10) 
      [GCC 9.4.0] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import lightgbm as lgb
      >>> import numpy as np
      >>> a1 = np.random.random((10,3))
      >>> a2 = np.random.random(10)
      >>> para = {'device_type': 'gpu'}
      >>> model = lgb.train(para,train_set=lgb.Dataset(a1,a2))
      [LightGBM] [Warning] There are no meaningful features which satisfy the provided configuration. Decreasing Dataset parameters min_data_in_bin or min_data_in_leaf and re-constructing Dataset might resolve this warning.
      [LightGBM] [Info] This is the GPU trainer!!
      [LightGBM] [Info] Total Bins 0
      [LightGBM] [Info] Number of data points in the train set: 10, number of used features: 0
      [LightGBM] [Info] Using GPU Device: NVIDIA H100 PCIe, Vendor: NVIDIA Corporation
      [LightGBM] [Info] Compiling OpenCL Kernel with 16 bins...
      1 warning generated.
      1 warning generated.
      ... ...
      1 warning generated.
      1 warning generated.
      [LightGBM] [Info] GPU programs have been built
      [LightGBM] [Warning] GPU acceleration is disabled because no non-trivial dense features can be found
      [LightGBM] [Info] Start training from score 0.482093
      [LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements
      [LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements
      ... ...
      [LightGBM] [Warning] Stopped training because there are no more leaves that meet the split requirements
      ... ...

       

标签:Info,...,lightgbm,LightGBM,python,gpu,packages,10
From: https://www.cnblogs.com/Song-Meow/p/18371521

相关文章

  • python map/filter/reduce的用法示例
    fromfunctoolsimportreducedeffunc0(a):"""a:可迭代对象的迭代元素将function应用于可迭代对象的对应元素,并返回一个迭代器,其中包含了所有映射后的结果map(function,iterable,...)function:要应用于可迭代对象的函数。iterable:要进行映射......
  • 豆瓣评分8.7!Python pandas创始人亲码的数据分析入门手册!
    在众多解释型语言中,Python最大的特点是拥有一个巨大而活跃的科学计算社区。进入21世纪以来,在行业应用和学术研究中采用python进行科学计算的势头越来越猛。近年来,由于Python有不断改良的库(主要是pandas),使其成为数据处理任务的一大代替方案,结合其在通用编程方面的强大实力,完......
  • 豆瓣评分9.0!Python3网络爬虫开发实战,堪称教学典范!
    今天我们所处的时代是信息化时代,是数据驱动的人工智能时代。在人工智能、物联网时代,万物互联和物理世界的全面数字化使得人工智能可以基于这些数据产生优质的决策,从而对人类的生产生活产生巨大价值。在这个以数据驱动为特征的时代,数据是最基础的。数据既可以通过研发产品获得,......
  • python实现自动化生成pdf报告
    easypdf使用手册1.项目介绍1.1关于1.2easypdf有什么优势1.2easypdf可以用来做什么1.3项目框架1.4项目教程视频2.安装项目环境2.1安装Python32.2在Windows上安装Python32.3在Mac上安装Python32.4在Linux上安装Python32.5在Windows上安装Pycharm2.6在Mac上......
  • C#调用python程序
    //在NuGet中安装pythonnet插件usingPython.Runtime;privatevoidbt_python_Click(objectsender,EventArgse){dynamicdynamic;Stopwatchsw=newStopwatch();sw.Start();Runtime.PythonDLL=Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Loc......
  • 基于python+flask框架的通识课在线选课系统(开题+程序+论文) 计算机毕设
    本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表开题报告内容研究背景随着互联网技术的飞速发展,教育领域正经历着深刻的变革,其中在线教育成为了一个重要的发展方向。通识教育作为高等教育体系中的重要组成部分......
  • 基于python+flask框架的楼盘销售管理信息系统(开题+程序+论文) 计算机毕设
    本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表开题报告内容研究背景随着房地产市场的蓬勃发展,楼盘销售管理面临着前所未有的挑战与机遇。传统的手工记录与管理方式已难以适应市场快速变化的需求,特别是在客户......
  • 基于python+flask框架的智慧小区团购系统(开题+程序+论文) 计算机毕设
    本系统(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面。系统程序文件列表开题报告内容研究背景随着信息技术的飞速发展和城市化进程的加快,智慧小区作为智慧城市的重要组成部分,正逐渐成为提升居民生活品质、优化社区管理的关键载体。在......
  • 【python】Python实现XGBoost算法的详细理论讲解与应用实战
    ✨✨欢迎大家来到景天科技苑✨✨......
  • python 调用通义千问SDK API
    前言通义千问在线AI助手:https://tongyi.aliyun.com/qianwen/通义千问官网文档地址:https://help.aliyun.com/zh/dashscope/developer-reference/(通义千问2024.4.26更新模型的API-KEY收费,非限时免费开放模型,有使用Token数量的限制)支持python3.8或以上版本配置流程1......