-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix device issue when host don't have cuda device
- Loading branch information
1 parent
f9a33a3
commit 5507623
Showing
2 changed files
with
31 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,28 @@ | |
================================================= | ||
██████╗ ██████╗ ██████╗ ██████╗ ██████╗ ███████╗ | ||
██╔══██╗██╔══██╗██╔══██╗██╔═══██╗██╔══██╗██╔════╝ | ||
██████╔╝██████╔╝██████╔╝██║ ██║██████╔╝█████╗ | ||
██╔═══╝ ██╔═══╝ ██╔══██╗██║ ██║██╔══██╗██╔══╝ | ||
██████╔╝██████╔╝██████╔╝██║ ██║██████╔╝█████╗ | ||
██╔═══╝ ██╔═══╝ ██╔══██╗██║ ██║██╔══██╗██╔══╝ | ||
██║ ██║ ██║ ██║╚██████╔╝██████╔╝███████╗ | ||
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ | ||
╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ | ||
================================================= | ||
MIT License | ||
Copyright (c) [2024] [[email protected]] | ||
Copyright (c) 2024 [email protected] | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
""" | ||
|
||
|
||
|
@@ -131,17 +146,17 @@ def show_status(self): | |
True values in green | ||
False values in red | ||
""" | ||
|
||
print(HELLO_PPROBE) | ||
|
||
def colorize(value): | ||
"""Return the value in green if True, in red if False.""" | ||
if value in (True, "True"): | ||
return f"\033[92m{value}\033[0m" # GREEN | ||
elif value in (False, "False"): | ||
return f"\033[91m{value}\033[0m" # RED | ||
return value | ||
|
||
status_in_color = [] | ||
|
||
for name, value in self.running_toggle.items(): | ||
|