Spaces:
Configuration error
Configuration error
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2022 Intel Corporation | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
import click | |
import sys | |
from tlt.utils.types import FrameworkType, UseCaseType | |
def list_group(): | |
""" Lists the available frameworks, use cases, or models """ | |
pass | |
def list_use_cases(): | |
print("\n".join([e.name.lower() for e in UseCaseType])) | |
def list_frameworks(): | |
print("\n".join([e.name.lower() for e in FrameworkType])) | |
def list_models(framework, use_case, verbose, markdown): | |
""" | |
List the supported models and the information that we have about each model from the config files. | |
""" | |
from tlt.models.model_factory import print_supported_models | |
try: | |
print_supported_models(framework, use_case, verbose, markdown) | |
except Exception as e: | |
sys.exit("Error while listing the supported models for framework: {}, use case: {}\n {}".format( | |
str(framework), str(use_case), str(e))) | |