GPU Resource Analysis Service
Sponsored by Enverge.ai - Simpler, greener, cheaper AI training platform. Enverge harnesses excess green energy for powerful, cost-effective computing on GPUs, enabling environmentally friendly AI model development, training, and fine-tuning. Currently in private alpha with limited spots available.
API endpoint to analyze PyTorch code for GPU resource usage.
Setup
- Install dependencies:
pip install -r requirements.txt
- Configure in
jupyterhub_config.py:
c.JupyterHub.services = [
{
'name': 'gpu-check',
'url': 'http://127.0.0.1:8005',
'command': ['python', '-m', 'gpu_check.gpu_check_service'],
'environment': {
'JUPYTERHUB_SERVICE_PREFIX': '/services/gpu-check',
'JUPYTERHUB_SERVICE_PORT': '8005'
}
}
]
API
POST /services/gpu-check
Analyzes PyTorch code for GPU resource usage.
Request:
{
"code": "your_python_code_here"
}
Response:
{
"has_resource_usage": true,
"operations": {
"compute": ["operation1", "operation2"],
"memory": ["operation1", "operation2"],
"transfer": ["operation1", "operation2"],
"query": ["operation1", "operation2"]
},
"device_variables": ["variable1", "variable2"],
"error": null
}
Usage in JupyterLab Extension
The service can be accessed from your JupyterLab extension using the authenticated endpoint:
const response = await fetch('/services/gpu-check', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ code: 'your_code_here' })
});
const result = await response.json();
GET /health
Health check endpoint.
Response:
{
"status": "healthy"
}
API Documentation
Once the server is running, you can access the interactive API documentation at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Metadata
Release files for jupyterhub-enverge-gpu-check 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyterhub_enverge_gpu_check-0.0.2.tar.gz | 9.8 kB | Without provenance | Details for jupyterhub_enverge_gpu_check-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyterhub_enverge_gpu_check-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for jupyterhub_enverge_gpu_check-0.0.2-py3-none-any.whl |
Total release size: 17.8 kB
Release files / jupyterhub_enverge_gpu_check-0.0.2.tar.gz
| Download URL | jupyterhub_enverge_gpu_check-0.0.2.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23589cad6a0ad6e453bad5669c7c2f50368b32e7ca10a4c8845c170c7e841be9
|
|
BLAKE2b-256 checksum How to use checksums |
b5e5321ba0e177f1e997ba3f69e39e5651087b5f498c589be272821a5d42aaea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Release files / jupyterhub_enverge_gpu_check-0.0.2-py3-none-any.whl
| Download URL | jupyterhub_enverge_gpu_check-0.0.2-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
470b367f81386810d64f70b8a0c679213f309f5d97052337c3eb335f00127814
|
|
BLAKE2b-256 checksum How to use checksums |
a413734aaf798ff41258c09e5cded5b4d70d23ed3d209fbdd9094e792433bfce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Security for jupyterhub-enverge-gpu-check 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.