import tensorflow as tf import psutil print("--- Hardware Verification ---") print(f"TensorFlow Version: {tf.__version__}") # Check GPU availability gpus = tf.config.list_physical_devices('GPU') if gpus: print(f"✅ GPU Detected: {gpus}") else: print("⚠️ No GPU detected by TensorFlow. Running on CPU instead.") # Check Telemetry Packages print(f"Available RAM: {psutil.virtual_memory().available / (1024**3):.2f} GB") try: import pynvml pynvml.nvmlInit() handle = pynvml.nvmlDeviceGetHandleByIndex(0) temp = pynvml.nvmlDeviceGetTemperature(handle, pynvml.NVML_TEMPERATURE_GPU) print(f"✅ NVML initialized. Current GPU Temp: {temp}°C") except Exception as e: print("⚠️ NVML (GPU Tracking) failed to initialize. Ensure an NVIDIA GPU and drivers are present.")