system_info
sleap_nn.system_info
¶
System diagnostics and compatibility checking for sleap-nn.
Functions:
| Name | Description |
|---|---|
check_driver_compatibility |
Check if driver version is compatible with CUDA version. |
get_min_driver_for_cuda |
Get minimum driver versions for a CUDA version. |
get_nvidia_driver_version |
Get NVIDIA driver version from nvidia-smi. |
get_package_info |
Get package version, location, and install source. |
get_startup_info_string |
Get a concise system info string for startup logging. |
get_system_info_dict |
Get system information as a dictionary. |
parse_driver_version |
Parse driver version string into comparable tuple. |
print_system_info |
Print comprehensive system diagnostics to console. |
test_gpu_operations |
Test that GPU tensor operations work. |
check_driver_compatibility(driver_version, cuda_version)
¶
Check if driver version is compatible with CUDA version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
driver_version
|
str
|
Installed driver version string |
required |
cuda_version
|
str
|
CUDA version from PyTorch |
required |
Returns:
| Type | Description |
|---|---|
tuple[bool, Optional[str]]
|
Tuple of (is_compatible, min_required_version). If CUDA version is unknown, returns (True, None). |
Source code in sleap_nn/system_info.py
get_min_driver_for_cuda(cuda_version)
¶
Get minimum driver versions for a CUDA version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cuda_version
|
str
|
CUDA version string (e.g., "12.6" or "12.6.1") |
required |
Returns:
| Type | Description |
|---|---|
Optional[tuple[str, str]]
|
Tuple of (min_linux, min_windows) or None if unknown version. |
Source code in sleap_nn/system_info.py
get_nvidia_driver_version()
¶
Get NVIDIA driver version from nvidia-smi.
Source code in sleap_nn/system_info.py
get_package_info(name)
¶
Get package version, location, and install source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Package name (e.g., "sleap-nn") |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Dict with version, location, source, and editable fields. |
Source code in sleap_nn/system_info.py
get_startup_info_string()
¶
Get a concise system info string for startup logging.
Returns:
| Type | Description |
|---|---|
str
|
Single-line string with key system info. |
Source code in sleap_nn/system_info.py
get_system_info_dict()
¶
Get system information as a dictionary.
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary with system info including Python version, platform, PyTorch version, CUDA availability, GPU details, and package versions. |
Source code in sleap_nn/system_info.py
parse_driver_version(version)
¶
Parse driver version string into comparable tuple.
print_system_info()
¶
Print comprehensive system diagnostics to console.
Source code in sleap_nn/system_info.py
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | |
test_gpu_operations()
¶
Test that GPU tensor operations work.
Returns:
| Type | Description |
|---|---|
tuple[bool, Optional[str]]
|
Tuple of (success, error_message). |