osc-usage-dashboard / config.py
buckeyeguy's picture
Upload config.py with huggingface_hub
bf4f325 verified
"""Shared config extracted from collect.py — colors, allocations, project codes."""
from __future__ import annotations
from datetime import date
PROJECT_CODES = ["PAS1266", "PAS3209"]
INTERACTIVE_METHODS = frozenset({"Jupyter", "Desktop", "Code Server", "MATLAB", "MLflow"})
COLORS = {
"systems": {"PITZER": "#2176AE", "ASCEND": "#57B894", "CARDINAL": "#F4845F"},
"cpu_gpu": {"CPU": "#2176AE", "GPU": "#F4845F"},
"states": {
"COMPLETED": "#57B894",
"FAILED": "#E63946",
"CANCELLED": "#FFB703",
"TIMEOUT": "#8338EC",
"NODE_FAIL": "#264653",
"OUT_OF_MEMORY": "#E76F51",
},
"outcome_categories": {
# Interactive
"Quick Exit": "#FFB703",
"User Ended": "#57B894",
"Session Expired": "#C4B5FD",
# Batch
"Completed": "#57B894",
"Timed Out": "#8338EC",
"Cancelled": "#FFB703",
# Shared
"Failed": "#E63946",
"Out of Memory": "#E76F51",
},
"projects": {"PAS1266": "#2176AE", "PAS3209": "#F4845F"},
"launch_methods": {
"Jupyter": "#E63946",
"Desktop": "#FFB703",
"Code Server": "#8338EC",
"MATLAB": "#264653",
"MLflow": "#57B894",
"Batch": "#2176AE",
},
"pie": [
"#2176AE",
"#57B894",
"#F4845F",
"#FFB703",
"#8338EC",
"#264653",
"#E63946",
"#A8DADC",
],
}
ALLOCATIONS = {
"PAS1266": 2257.0,
"PAS3209": 1211.0,
}
FISCAL_YEAR_END = date(2026, 6, 30)
STATE_ORDER = ["COMPLETED", "FAILED", "CANCELLED", "TIMEOUT", "NODE_FAIL", "OUT_OF_MEMORY"]
QUICK_EXIT_SECONDS = 300 # 5 minutes