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,12 +144,12 @@ 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:
''' '''
Print a table of models, their descriptions, and load status Print a table of models, their descriptions, and load status