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

feat: add gpu info to health state [TAB-162] #364

Merged
merged 15 commits into from
Aug 21, 2023
Merged

feat: add gpu info to health state [TAB-162] #364

merged 15 commits into from
Aug 21, 2023

Conversation

vodkaslime
Copy link
Contributor

What this PR is about

Adding GPU information to health state if possible - when cuda is supported in the environment. In environments where cuda is not supported (e.g. in MacOS or in docker containers where --gpus is not specified), just return with empty data.

In AWS g4dn instances where gpus are specified, examples are like:

{
    "model": "TabbyML/T5P-220M",
    "device": "cuda",
    "compute_type": "auto",
    "arch": "x86_64",
    "cpu_info": "Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz",
    "cpu_count": 4,
    "gpu_info": [
        "Tesla T4"
    ],
    "version": {
        "build_date": "2023-08-20",
        "build_timestamp": "2023-08-20T18:16:17.790164841Z",
        "git_sha": "VERGEN_IDEMPOTENT_OUTPUT",
        "git_describe": "VERGEN_IDEMPOTENT_OUTPUT"
    }
}

In AWS g4dn instances where gpus are not specified, examples are like:

{
    "model": "TabbyML/T5P-220M",
    "device": "cpu",
    "compute_type": "auto",
    "arch": "x86_64",
    "cpu_info": "Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz",
    "cpu_count": 4,
    "gpu_info": [],
    "version": {
        "build_date": "2023-08-20",
        "build_timestamp": "2023-08-20T18:16:17.790164841Z",
        "git_sha": "VERGEN_IDEMPOTENT_OUTPUT",
        "git_describe": "VERGEN_IDEMPOTENT_OUTPUT"
    }
}

crates/tabby/src/serve/mod.rs Outdated Show resolved Hide resolved
crates/tabby/src/serve/context.rs Outdated Show resolved Hide resolved
crates/tabby/src/serve/context.rs Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
@wsxiaoys wsxiaoys marked this pull request as draft August 21, 2023 02:55
@vodkaslime vodkaslime marked this pull request as ready for review August 21, 2023 07:14
Copy link
Member

@wsxiaoys wsxiaoys left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

crates/tabby/src/serve/health.rs Outdated Show resolved Hide resolved
crates/tabby/src/serve/health.rs Outdated Show resolved Hide resolved
crates/tabby/src/serve/health.rs Outdated Show resolved Hide resolved
crates/tabby/src/serve/health.rs Outdated Show resolved Hide resolved
@wsxiaoys wsxiaoys marked this pull request as draft August 21, 2023 09:25
@wsxiaoys wsxiaoys marked this pull request as ready for review August 21, 2023 09:43
@wsxiaoys wsxiaoys merged commit 2a91a21 into main Aug 21, 2023
3 checks passed
@wsxiaoys wsxiaoys deleted the add-gpu-info branch August 21, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants