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 } model_name2: { etc }
''' '''
result = dict()
for name in self.config: for name in self.config:
try: try:
description = self.config[name].description description = self.config[name].description
@ -143,11 +144,11 @@ class ModelCache(object):
else: else:
status = 'not loaded' status = 'not loaded'
return { result[name]={
name: {
'status' : status, 'status' : status,
'description': description, 'description' : description
}} }
return result
def print_models(self) -> None: def print_models(self) -> None:
''' '''