Skip to content

Commit

Permalink
feat: add preset model indicator when printing evaluable model (#252)
Browse files Browse the repository at this point in the history
* add client evaluation preset

* add more description
  • Loading branch information
ZingLix authored Feb 5, 2024
1 parent b07104e commit 6ae6948
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion python/qianfan/common/client/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,22 @@ def list_evaluable_models(
model_list = ModelResource.evaluable_model_list()["result"]
console = Console()
table = Table(show_lines=True)
col_list = ["Model Name", "Train Type", "Model Version List"]
col_list = ["Model Name", "Platform Preset", "Train Type", "Model Version List"]
for col in col_list:
table.add_column(col)
for model in model_list:
row_items: List[RenderableType] = []
# Model Name
row_items.append(f"{model['modelName']}\n[dim]{model['modelIdStr']}[/]")
# Platform Preset
model_source = model["source"]
if model_source == "PlatformPreset":
row_items.append("Yes")
else:
row_items.append(f"No\n[dim]{model_source}[/]")
# Train Type
row_items.append(model["trainType"])
# Model Version List
version_list = [
f"{version['version']} [dim]({version['modelVersionIdStr']})[/]"
for version in model["modelVersionList"]
Expand Down

0 comments on commit 6ae6948

Please sign in to comment.