You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

πŸ₯ Healthcare RL Environment

An OpenEnv-compliant multi-task reinforcement learning environment for healthcare decision-making, built for the Hackathon submission.

🎯 Tasks (4 total, all graded 0.0 β†’ 1.0)

# Task ID Description Reward Signal
1 medical_diagnosis Diagnose a patient from symptoms Exact=1.0, Same category=0.5, Wrong=0.0
2 drug_dosage Recommend optimal drug dose (mg/kg) Smooth decay from optimal dose
3 patient_triage Priority-order patients by criticality Normalised Kendall-Ο„ correlation
4 treatment_planning Select evidence-based treatment protocol Guideline adherence βˆ’ contraindication penalty

πŸš€ Quick Start

Prerequisites

export API_BASE_URL="https://your-llm-api-endpoint/v1"
export MODEL_NAME="your-model-id"
export HF_TOKEN="your-hf-or-api-token"

Run with Docker

docker build -t healthcare-rl-env .
docker run -p 8000:8000 \
  -e API_BASE_URL=$API_BASE_URL \
  -e MODEL_NAME=$MODEL_NAME \
  -e HF_TOKEN=$HF_TOKEN \
  healthcare-rl-env

Run locally

pip install -r requirements.txt
uvicorn app:app --host 0.0.0.0 --port 8000 --reload

πŸ“‘ API Endpoints

Method Path Description
GET /health Health check β€” returns {"status": "ok"}
POST /reset Reset env; body: {"task_id": "...", "seed": 42}
POST /step Take action; body: {"action": {...}}
GET /state Current environment state
GET /tasks List all available tasks
GET /docs Interactive Swagger UI

Example session

# Reset to medical_diagnosis task
curl -X POST http://localhost:8000/reset \
  -H "Content-Type: application/json" \
  -d '{"task_id": "medical_diagnosis", "seed": 42}'

# Take a step
curl -X POST http://localhost:8000/step \
  -H "Content-Type: application/json" \
  -d '{"action": {"diagnosis": "myocardial_infarction"}}'

# Check state
curl http://localhost:8000/state

πŸ€– Running Inference

# With server already running:
export ENV_HOST="http://localhost:8000"
python inference.py

Inference uses the OpenAI client pointed at API_BASE_URL and emits structured logs:

[START] {"episode": 1, "task": "medical_diagnosis"}
[STEP]  {"episode": 1, "task": "medical_diagnosis", "step": 1, "action": {...}, "reward": 1.0, "done": true}
[END]   {"episode": 1, "task": "medical_diagnosis", "total_reward": 1.0, "score": 1.0}

βœ… Pre-submission Validation

python validator.py

πŸ“‹ OpenEnv Compliance Checklist

  • openenv.yaml with typed models, task definitions, env_var declarations
  • POST /reset endpoint
  • POST /step endpoint
  • GET /state endpoint
  • GET /health returns 200 (HF Space ping)
  • inference.py in root, uses OpenAI client
  • 4 tasks with graders, all scores in [0.0, 1.0]
  • [START] / [STEP] / [END] structured logs
  • Runtime < 20 min on vcpu=2, memory=8gb
  • Dockerfile for containerised build
  • validator.py for pre-submission checks
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support