-
Notifications
You must be signed in to change notification settings - Fork 974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop: rectify face_recognition.yaml & PP-ShiTuV2.yaml, del device=gpu. #2705
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
…t finding no gpus on Jetson. Validated on both Jetson and Remote Server
paddlex/utils/device.py
Outdated
# maybe edge devices like Jetson | ||
if os.path.exists("/etc/nv_tegra_release"): | ||
avail_gpus = [0] | ||
# print(f"* DEBUG: avail_gpus = {avail_gpus}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去掉调试用的注释
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在最新的commit里已经删除。
|
||
import lazy_paddle as paddle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需确认下是否安装了pre-commit钩子
@@ -32,6 +32,11 @@ def _constr_device(device_type, device_ids): | |||
|
|||
def get_default_device(): | |||
avail_gpus = GPUtil.getAvailable() | |||
if not avail_gpus: | |||
# maybe edge devices like Jetson | |||
if os.path.exists("/etc/nv_tegra_release"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这种方式看起来有点儿hack,建议加一句debug日志
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE。
# maybe edge devices like Jetson | ||
if os.path.exists("/etc/nv_tegra_release"): | ||
avail_gpus = [0] | ||
print( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用paddlex的logging模块吧,另外我们使用GPUtil
是一个实现细节,不必告诉用户,只需要告知用户接下来的行为是使用gpu:0
就行
Rectify face_recognition.yaml & PP-ShiTuV2.yaml, del device=gpu.
Unify the default YAMLs of the pipelines.