{ "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": "2023-10-22T14:56:50.499828Z", "iopub.status.busy": "2023-10-22T14:56:50.499108Z", "iopub.status.idle": "2023-10-22T14:56:51.735192Z", "shell.execute_reply": "2023-10-22T14:56:51.734180Z" }, "pycharm": { "name": "#%%\n" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "OS: Linux-6.2.0-1014-azure-x86_64-with-glibc2.34\n", "Python: CPython 3.8.18\n", "CPU Brand: Intel(R) Xeon(R) Platinum 8171M CPU @ 2.60GHz\n", "CPU Count: 2\n", "CPU Freq: 2095.22 MHz\n", "Memory Size: 6.760 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, these information in deployed documentation is automatically executed on Github Action. Therefore, some performance data may be different. In the `README.md`, it is the result of our local test." ] } ], "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 }