CoolFace
Apppublic

prashant-9457/my-openenv-task

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
openenv.yaml117 linesDownload Raw Back to root
1name: icu-resource-allocation2version: "1.0.0"3description: >4  A real-world OpenEnv environment modelling a 20-bed ICU in a 500-bed Indian5  tertiary-care hospital.  An AI agent acts as the ICU charge coordinator,6  making resource allocation decisions every 30 minutes over a 24-hour duty7  cycle.  The agent must balance patient admissions, nurse staffing, equipment8  utilisation and a daily operating budget to minimise preventable deaths and9  adverse events while maintaining NABH-compliant care standards.10 11author: "OpenEnv Hackathon Participant"12license: MIT13 14real_world_basis:15  - "SOFA score (Sequential Organ Failure Assessment) — gold-standard ICU triage tool (Vincent et al., 1996)"16  - "NABH nurse:patient ratio standard — 1:2 for ICU (National Accreditation Board for Hospitals, India)"17  - "Bed turnover times from Agnihotri et al., Indian J Crit Care Med 2019"18  - "Patient arrival peaks: Arias-Verdú et al., Critical Care Medicine 2017"19  - "SOFA-to-mortality mapping: Ferreira et al., JAMA 2001"20  - "Cost calibration: CGHS ICU package rates 2023 (Central Govt Health Scheme, India)"21 22action_space:23  type: Discrete24  n: 725  labels:26    0: "HOLD — observe, no allocation change"27    1: "ADMIT_CRITICAL — admit highest-SOFA patient from queue"28    2: "ADMIT_FIFO — admit longest-waiting patient"29    3: "TRANSFER_OUT — move most stable patient to step-down unit"30    4: "CALL_EXTRA_NURSE — overtime nurse this shift (₹1,200)"31    5: "SPECIALIST_CONSULT — consult for sickest patient (₹3,500, -15% mortality risk)"32    6: "EXPEDITE_BED — housekeeping overtime to clean bed faster (₹600)"33 34observation_space:35  type: Dict36  n_fields: 2737  fields:38    beds_total:             { type: int,   value: 20,          description: "Total ICU beds" }39    beds_occupied:          { type: int,   range: [0,20],      description: "Current patients in ICU" }40    beds_available:         { type: int,   range: [0,20],      description: "Beds ready for admission" }41    beds_in_turnover:       { type: int,   range: [0,20],      description: "Beds being cleaned/prepared" }42    queue_total:            { type: int,   range: [0,50],      description: "Patients waiting for ICU admission" }43    queue_critical:         { type: int,   range: [0,50],      description: "Waiting patients with SOFA ≥ 11" }44    queue_severe:           { type: int,   range: [0,50],      description: "Waiting patients with SOFA 7-10" }45    queue_moderate:         { type: int,   range: [0,50],      description: "Waiting patients with SOFA < 7" }46    queue_max_wait_steps:   { type: int,   range: [0,48],      description: "Steps since oldest waiting patient arrived" }47    avg_icu_sofa:           { type: float, range: [0.0,24.0],  description: "Mean SOFA of current ICU patients" }48    avg_icu_mortality_risk: { type: float, range: [0.0,1.0],   description: "Mean mortality probability of ICU patients" }49    ventilators_available:  { type: int,   range: [0,12],      description: "Ventilators free" }50    ventilators_in_use:     { type: int,   range: [0,12],      description: "Ventilators in use" }51    dialysis_available:     { type: int,   range: [0,4],       description: "Dialysis machines free" }52    nurses_on_duty:         { type: int,   range: [8,20],      description: "Nurses currently on shift" }53    nurse_patient_ratio:    { type: float, range: [0.0,5.0],   description: "Patients per nurse (NABH limit: 2.0)" }54    doctors_on_duty:        { type: int,   value: 2,           description: "Intensivists on call" }55    shift:                  { type: int,   range: [0,2],       description: "0=Day 1=Evening 2=Night" }56    time_of_day:            { type: float, range: [0.0,24.0],  description: "Current hour" }57    step:                   { type: int,   range: [0,48],      description: "Current step (each = 30 min)" }58    budget_remaining_inr:   { type: float, range: [0,150000],  description: "Remaining daily budget in INR" }59    budget_utilisation_pct: { type: float, range: [0,100],     description: "Percent of budget used" }60    admissions_today:       { type: int,   range: [0,50],      description: "ICU admissions this episode" }61    transfers_today:        { type: int,   range: [0,20],      description: "Step-down transfers this episode" }62    deaths_in_queue:        { type: int,   range: [0,20],      description: "Preventable deaths (patient died waiting)" }63    adverse_events:         { type: int,   range: [0,50],      description: "Adverse events in ICU (understaffing-related)" }64    wait_violations:        { type: int,   range: [0,100],     description: "Critical patient wait-time breaches" }65 66episode:67  max_steps: 4868  step_duration_minutes: 3069  description: "One 24-hour ICU duty cycle starting at 08:00"70 71reward:72  range: [-8.0, 3.0]73  partial_signals: true74  description: >75    Multi-objective reward emitted at every step.76    Includes: nurse-ratio score (+1.0), critical wait penalty (-1.5/violation),77    missed-admission penalty (-0.5), budget conservation (+0.2), throughput (+0.5),78    equipment saturation penalty (-0.4).79 80tasks:81  - id: task_easy82    name: "Prevent Preventable Deaths"83    description: >84      Run a 24-hour shift with zero queue deaths and nurse:patient ratio breaches85      in fewer than 10% of steps. Baseline safety standard.86    difficulty: easy87    grader: graders/task_graders.py::grade_task_easy88 89  - id: task_medium90    name: "NABH-Compliant Critical Care"91    description: >92      Zero queue deaths + safe nurse ratio + all critical patients (SOFA ≥ 11)93      admitted within 2 hours of arrival. Maps to NABH Grade-B ICU standard.94    difficulty: medium95    grader: graders/task_graders.py::grade_task_medium96 97  - id: task_hard98    name: "JCI-Grade ICU Excellence"99    description: >100      All medium criteria + zero adverse events + budget utilisation ≤ 85% +101      average patient SOFA non-increasing over the shift. Matches JCI / NABH102      Grade-A quality improvement benchmarks.103    difficulty: hard104    grader: graders/task_graders.py::grade_task_hard105 106env_vars:107  API_BASE_URL: { description: "LLM API endpoint", required: true }108  MODEL_NAME:   { description: "Model identifier for inference", required: true }109  HF_TOKEN:     { description: "HuggingFace API key", required: true }110 111infra:112  runtime_limit_minutes: 20113  vcpu: 2114  memory_gb: 8115  hf_space: true116  inference_script: inference.py117