lablup / backend.ai

Backend.AI is a streamlined, container-based computing cluster platform that hosts popular computing/ML frameworks and diverse programming languages, with pluggable heterogeneous accelerator support including CUDA GPU, ROCm GPU, TPU, IPU and other NPUs.
https://www.backend.ai
GNU Lesser General Public License v3.0
519 stars 153 forks source link

feat: Add session status checker GQL mutation #2836

Closed fregataa closed 3 weeks ago

fregataa commented 2 months ago

Mutation

mutation CheckandtransitSession {
    check_and_transit_session_status(
        input: {ids: ["SESSION-ID",]}
    ) {
        sessions {
            id
            row_id
            name
            status
            status_history
            occupied_slots
        }
    }
}

Response

{
    "data": {
        "check_and_transit_session_status": {
            "item": [
                {
                    "id": "NODE-ID",
                    "row_id": "SESSION-ID",
                    "name": "SESSION-NAME",
                    "status": "RUNNING",
                    "status_history": "{\"PENDING\": \"2024-09-14T03:35:54.218019+00:00\", \"RUNNING\": \"2024-09-14T03:36:05.431593+00:00\", \"PREPARING\": \"2024-09-14T03:35:55.013239+00:00\", \"SCHEDULED\": \"2024-09-14T03:35:54.996003+00:00\"}",
                    "occupied_slots": "{\"cpu\": \"90\", \"mem\": \"30198988800\", \"cuda.device\": \"0\"}"
                }
            ]
        }
    }
}

Checklist: (if applicable)


📚 Documentation preview 📚: https://sorna--2836.org.readthedocs.build/en/2836/


📚 Documentation preview 📚: https://sorna-ko--2836.org.readthedocs.build/ko/2836/

fregataa commented 2 months ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @fregataa and the rest of your teammates on Graphite Graphite