Beispiel #1
0
def list(obj):
    models = ModelVersion.list(obj)
    versions_view = []
    for m in models:
        versions_view.append({
            'id': m.id,
            'name': m.name,
            '#': m.version,
            'status': m.status,
            'runtime': str(m.runtime),
            'apps': m.applications
        })
    click.echo(
        tabulate(sorted(versions_view, key=lambda x: (x['name'], x['#'])),
                 headers="keys",
                 tablefmt="github"))
Beispiel #2
0
def test_modelversion_list(cluster: Cluster,
                           model_version_builder: ModelVersionBuilder):
    mv: ModelVersion = model_version_builder.build(cluster)
    assert mv.id in [
        modelversion.id for modelversion in ModelVersion.list(cluster)
    ]