fix regression in ldm.invoke.model_cache.list_models()

- this was introduced in PR #1525 and not caught during my
  code review
This commit is contained in:
Lincoln Stein 2022-11-22 16:46:26 +00:00
parent 02d02a86b1
commit 8f5cded86e

View File

@ -130,6 +130,7 @@ class ModelCache(object):
},
model_name2: { etc }
'''
result = dict()
for name in self.config:
try:
description = self.config[name].description
@ -143,12 +144,12 @@ class ModelCache(object):
else:
status = 'not loaded'
return {
name: {
'status': status,
'description': description,
}}
result[name]={
'status' : status,
'description' : description
}
return result
def print_models(self) -> None:
'''
Print a table of models, their descriptions, and load status