We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22b3fe4 commit ed28c03Copy full SHA for ed28c03
src/utilities.py
@@ -14,7 +14,12 @@ def load_config(config_file):
14
return yaml.safe_load(file)
15
16
def is_nvidia_gpu_available(config):
17
- return config["Compute_Device"]["gpu_brand"].upper() == "NVIDIA"
+ gpu_brand = config.get("Compute_Device", {}).get("gpu_brand")
18
+
19
+ if isinstance(gpu_brand, str):
20
+ normalized_gpu_brand = gpu_brand.strip().lower()
21
+ return normalized_gpu_brand == "nvidia"
22
+ return False
23
24
config = load_config('config.yaml')
25
0 commit comments