mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
(Hotfix): Fix logs and filestore init for llm registry (#10470)
This commit is contained in:
@@ -39,6 +39,10 @@ class ConversationStats:
|
||||
pickled = pickle.dumps(self.service_to_metrics)
|
||||
serialized_metrics = base64.b64encode(pickled).decode('utf-8')
|
||||
self.file_store.write(self.metrics_path, serialized_metrics)
|
||||
logger.info(
|
||||
'Saved converation stats',
|
||||
extra={'conversation_id': self.conversation_id},
|
||||
)
|
||||
|
||||
def maybe_restore_metrics(self):
|
||||
if not self.file_store or not self.conversation_id:
|
||||
@@ -56,9 +60,6 @@ class ConversationStats:
|
||||
total_metrics = Metrics()
|
||||
for metrics in self.service_to_metrics.values():
|
||||
total_metrics.merge(metrics)
|
||||
|
||||
logger.info(f'metrics by all services: {self.service_to_metrics}')
|
||||
logger.info(f'combined metrics\n\n{total_metrics}')
|
||||
return total_metrics
|
||||
|
||||
def get_metrics_for_service(self, service_id: str) -> Metrics:
|
||||
|
||||
Reference in New Issue
Block a user