Spaces:
Runtime error
Runtime error
Added logging to endpoint start
Browse files- src/common.py +1 -0
- src/st_helpers.py +1 -0
src/common.py
CHANGED
@@ -101,6 +101,7 @@ def resume_hf_endpoint(username: str, endpoint_name: str, api_token: str = None)
|
|
101 |
url = f'https://api.endpoints.huggingface.cloud/v2/endpoint/{username}/{endpoint_name}/resume'
|
102 |
if api_token is None:
|
103 |
api_token = hf_api_token(write=True)
|
|
|
104 |
requests.post(url, headers={"Authorization": f"Bearer {api_token}"})
|
105 |
|
106 |
|
|
|
101 |
url = f'https://api.endpoints.huggingface.cloud/v2/endpoint/{username}/{endpoint_name}/resume'
|
102 |
if api_token is None:
|
103 |
api_token = hf_api_token(write=True)
|
104 |
+
logging.info(f"Pinging resume endpoint ({url})")
|
105 |
requests.post(url, headers={"Authorization": f"Bearer {api_token}"})
|
106 |
|
107 |
|
src/st_helpers.py
CHANGED
@@ -54,6 +54,7 @@ def show_system_status_bar() -> None:
|
|
54 |
st.write('\n'.join(all))
|
55 |
if st.button("Start all endpoints"):
|
56 |
for e in stopped:
|
|
|
57 |
resume_hf_endpoint('alfraser', e)
|
58 |
st.write(
|
59 |
'**Note** - endpoint start may take multiple minutes, so refresh and check status periodically')
|
|
|
54 |
st.write('\n'.join(all))
|
55 |
if st.button("Start all endpoints"):
|
56 |
for e in stopped:
|
57 |
+
logging.info(f"Requesting start of {e}")
|
58 |
resume_hf_endpoint('alfraser', e)
|
59 |
st.write(
|
60 |
'**Note** - endpoint start may take multiple minutes, so refresh and check status periodically')
|