From 05fc8b3fbcb415e3ae62513b158f6ea29242e940 Mon Sep 17 00:00:00 2001 From: Daniel Kleine <53251018+d-kleine@users.noreply.github.com> Date: Thu, 19 Sep 2024 08:01:09 +0200 Subject: [PATCH 1/2] fixed imports and docstring --- watermark/watermark.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/watermark/watermark.py b/watermark/watermark.py index f84d93d..2ec0241 100644 --- a/watermark/watermark.py +++ b/watermark/watermark.py @@ -18,7 +18,6 @@ import types from multiprocessing import cpu_count from socket import gethostname -import platform try: from py3nvml import py3nvml @@ -340,7 +339,7 @@ def _get_conda_env(): def _get_gpu_info(): if py3nvml is None: return {"GPU Info": "Install the gpu extra " - "(pip install 'watermark[gpu]') " + "(pip install watermark[gpu]) " "to display GPU information for NVIDIA chipsets"} try: gpu_info = [""] From ad966be0129dea6159fc0a5dac94dc4015f1e496 Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Thu, 19 Sep 2024 08:43:31 -0700 Subject: [PATCH 2/2] Update watermark.py --- watermark/watermark.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/watermark/watermark.py b/watermark/watermark.py index 2ec0241..f3bd81c 100644 --- a/watermark/watermark.py +++ b/watermark/watermark.py @@ -338,9 +338,9 @@ def _get_conda_env(): def _get_gpu_info(): if py3nvml is None: - return {"GPU Info": "Install the gpu extra " - "(pip install watermark[gpu]) " - "to display GPU information for NVIDIA chipsets"} + return {"GPU Info": 'Install the gpu extra ' + '(pip install "watermark[gpu])") ' + 'to display GPU information for NVIDIA chipsets'} try: gpu_info = [""] py3nvml.nvmlInit()