hide non-featured (older) models from model list command without show-all flag (#23)

This commit is contained in:
Dalton Flanagan 2024-08-07 23:31:30 -04:00 committed by GitHub
parent 7664d5701d
commit da4645a27a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ class ModelList(Subcommand):
self.parser.set_defaults(func=self._run_model_list_cmd)
def _add_arguments(self):
pass
self.parser.add_argument('--show-all', action='store_true', help='Show all models (not just defaults)')
def _run_model_list_cmd(self, args: argparse.Namespace) -> None:
headers = [
@ -39,6 +39,9 @@ class ModelList(Subcommand):
rows = []
for model in all_registered_models():
if not args.show_all and not model.is_featured:
continue
req = model.hardware_requirements
descriptor = model.descriptor()