{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "# Run Environment Information"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "Here is the information from the running environment."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "execution": {
     "iopub.execute_input": "2024-06-28T12:17:33.918140Z",
     "iopub.status.busy": "2024-06-28T12:17:33.917932Z",
     "iopub.status.idle": "2024-06-28T12:17:35.095165Z",
     "shell.execute_reply": "2024-06-28T12:17:35.094352Z"
    },
    "pycharm": {
     "name": "#%%\n"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "OS: Linux-6.5.0-1022-azure-x86_64-with-glibc2.34\n",
      "Python: CPython 3.8.18\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU Brand: AMD EPYC 7763 64-Core Processor\n",
      "CPU Count: 4\n",
      "CPU Freq: 2921.14325 MHz\n",
      "Memory Size: 15.606 GiB\n",
      "Has CUDA: No\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import platform\n",
    "import shutil\n",
    "\n",
    "import cpuinfo\n",
    "import psutil\n",
    "from hbutils.scale import size_to_bytes_str\n",
    "\n",
    "print('OS:', platform.platform())\n",
    "print('Python:', platform.python_implementation(), platform.python_version())\n",
    "print('CPU Brand:', cpuinfo.get_cpu_info()[\"brand_raw\"])\n",
    "print('CPU Count:', os.cpu_count())\n",
    "print('CPU Freq:', psutil.cpu_freq().current, 'MHz')\n",
    "print('Memory Size:', size_to_bytes_str(psutil.virtual_memory().total, precision=3))\n",
    "print('Has CUDA:', 'Yes' if shutil.which('nvidia-smi') else 'No')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%% md\n"
    }
   },
   "source": [
    "Please note that, this information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different with your local environment"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}