Skip to content

Commit

Permalink
Update resources.py
Browse files Browse the repository at this point in the history
Updated get_number_of_gpus function

Signed-off-by: Parth Mandaliya <parthx.mandaliya@intel.com>
  • Loading branch information
ParthM-GitHub committed Sep 28, 2023
1 parent 522a28c commit 0aa070f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions openfl/experimental/utilities/resources.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright (C) 2020-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

"""openfl.experimental.utilities.resources module."""

from logging import getLogger
Expand All @@ -25,6 +24,6 @@ def get_number_of_gpus() -> int:
stdout = op.stdout.decode().strip()
return len(stdout.split("\n"))
except FileNotFoundError:
logger.warning(f'No GPUs found! If this is a mistake please try running "{command}" '
+ 'manually.')
logger.warning(f"No GPUs found! If this is a mistake please try running '{command}' "
+ "manually.")
return 0

0 comments on commit 0aa070f

Please sign in to comment.