Merge cluster to master #3
|
@ -53,7 +53,7 @@ def generate_stats(regen: bool = False):
|
||||||
'openaiKeys': '∞',
|
'openaiKeys': '∞',
|
||||||
'anthropicKeys': '∞',
|
'anthropicKeys': '∞',
|
||||||
},
|
},
|
||||||
'backend_info': redis.get_dict('backend_info') if opts.show_backend_info else None,
|
'backends': {},
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: have get_model_choices() return all the info so we don't have to loop over the backends ourself
|
# TODO: have get_model_choices() return all the info so we don't have to loop over the backends ourself
|
||||||
|
@ -64,7 +64,7 @@ def generate_stats(regen: bool = False):
|
||||||
if not backend_info['online']:
|
if not backend_info['online']:
|
||||||
continue
|
continue
|
||||||
backend_uptime = int((datetime.now() - datetime.fromtimestamp(backend_info['startup_time'])).total_seconds()) if opts.show_uptime else None
|
backend_uptime = int((datetime.now() - datetime.fromtimestamp(backend_info['startup_time'])).total_seconds()) if opts.show_uptime else None
|
||||||
output['backend_info'][backend_info['hash']] = {
|
output['backends'][backend_info['hash']] = {
|
||||||
'uptime': backend_uptime,
|
'uptime': backend_uptime,
|
||||||
'max_tokens': backend_info['model_config']['max_position_embeddings'],
|
'max_tokens': backend_info['model_config']['max_position_embeddings'],
|
||||||
'model': backend_info['model'],
|
'model': backend_info['model'],
|
||||||
|
@ -72,8 +72,6 @@ def generate_stats(regen: bool = False):
|
||||||
'nvidia': backend_info['nvidia'],
|
'nvidia': backend_info['nvidia'],
|
||||||
'priority': backend_info['priority'],
|
'priority': backend_info['priority'],
|
||||||
}
|
}
|
||||||
else:
|
|
||||||
output['backend_info'] = {}
|
|
||||||
|
|
||||||
result = deep_sort(output)
|
result = deep_sort(output)
|
||||||
|
|
||||||
|
|
Reference in New Issue