Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chakib-belgaid committed May 5, 2020
1 parent e2cc223 commit 801dcb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyJoules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
from .energy_sample import EnergySample


__version__ = '0.2.4'
__version__ = '0.2.4.1'
5 changes: 4 additions & 1 deletion pyJoules/energy_device/energy_device_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
try :
from .nvidia_device import NvidiaGPUDevice
except ImportError:
NvidiaGPUDevice=None
logging.warning(f'pynvml not found you can\'t use NVIDIA devices')

from ..exception import NoSuchEnergyDeviceError
Expand All @@ -37,7 +38,9 @@ class EnergyDeviceFactory:

@staticmethod
def _gen_all_available_domains() -> List[EnergyDevice]:
available_api = [RaplDevice, NvidiaGPUDevice]
available_api = [RaplDevice]
if NvidiaGPUDevice is not None :
available_api.append(NvidiaGPUDevice)
available_domains = []
for api in available_api:
try:
Expand Down

0 comments on commit 801dcb3

Please sign in to comment.