Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 823 Bytes
649d6d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
from src.envs import (
API,
EVAL_REQUESTS_PATH,
DYNAMIC_INFO_REPO,
DYNAMIC_INFO_FILE_PATH,
DYNAMIC_INFO_PATH,
EVAL_RESULTS_PATH,
H4_TOKEN, IS_PUBLIC,
QUEUE_REPO,
REPO_ID,
RESULTS_REPO,
SHOW_INCOMPLETE_EVALS
)
from huggingface_hub import snapshot_download
import os
import glob
import json
snapshot_download(repo_id=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30)
with open('model_list.txt', 'w') as fw:
for filepath in glob.glob(os.path.join(EVAL_REQUESTS_PATH, '**/*.json'), recursive=True):
with open(filepath, 'r') as f:
model_data = json.load(f)
if model_data['status'] == 'FINISHED':
print(model_data['model'])
fw.write(' - '+ model_data['model'] + '\n') |