Skip to content
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

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

yutian929
Copy link
Contributor

Rectify face_recognition.yaml & PP-ShiTuV2.yaml, del device=gpu.
Unify the default YAMLs of the pipelines.

Copy link

paddle-bot bot commented Dec 20, 2024

Thanks for your contribution!

# maybe edge devices like Jetson
if os.path.exists("/etc/nv_tegra_release"):
avail_gpus = [0]
# print(f"* DEBUG: avail_gpus = {avail_gpus}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉调试用的注释

Copy link
Contributor Author

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
Copy link
Member

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"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这种方式看起来有点儿hack,建议加一句debug日志

Copy link
Contributor Author

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(
Copy link
Member

@Bobholamovic Bobholamovic Dec 31, 2024

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就行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants