alfraser commited on
Commit
82150c1
·
1 Parent(s): 2f008c2

Added awareness of the 'failed' status for an endpoint

Browse files
Files changed (2) hide show
  1. pages/900_System_Status.py +3 -0
  2. src/common.py +1 -0
pages/900_System_Status.py CHANGED
@@ -40,6 +40,9 @@ if st_setup('LLM Arch'):
40
  if st.button("Resume", key=f'action_{i}'):
41
  resume_hf_endpoint('alfraser', e)
42
  st.rerun()
 
 
 
43
  else:
44
  refresh = True
45
  with status_col:
 
40
  if st.button("Resume", key=f'action_{i}'):
41
  resume_hf_endpoint('alfraser', e)
42
  st.rerun()
43
+ elif status == HF_FAILED:
44
+ with status_col:
45
+ st.error(message)
46
  else:
47
  refresh = True
48
  with status_col:
src/common.py CHANGED
@@ -58,6 +58,7 @@ def hf_api_token(write: bool = False) -> str:
58
  HF_RUNNING = 'running'
59
  HF_SCALEDTOZERO = 'scaleToZero'
60
  HF_PAUSED = 'paused'
 
61
 
62
 
63
  def hf_endpoint_status(username: str, endpoint_name: str, api_token: str = None) -> Tuple[bool, bool]:
 
58
  HF_RUNNING = 'running'
59
  HF_SCALEDTOZERO = 'scaleToZero'
60
  HF_PAUSED = 'paused'
61
+ HF_FAILED = 'failed'
62
 
63
 
64
  def hf_endpoint_status(username: str, endpoint_name: str, api_token: str = None) -> Tuple[bool, bool]: