Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoxinxing committed Aug 29, 2022
1 parent 106b5c3 commit 07f548d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion client/starwhale/api/_impl/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ def _starwhale_internal_run_cmp(self) -> None:
threshold=_threshold,
)
_id += 1
self.evaluation.log(f"roc_auc/summary", id=_label, auc=_roc_auc["auc"])
self.evaluation.log(
"roc_auc/summary", id=_label, auc=_roc_auc["auc"]
)

@_record_status # type: ignore
def _starwhale_internal_run_ppl(self) -> None:
Expand Down
6 changes: 4 additions & 2 deletions client/starwhale/core/eval/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,14 @@ def _r(_tree: t.Any, _obj: t.Any) -> None:
table.add_column("Label", style="cyan")
keys = labels[sort_label_names[0]]
for _k in keys:
if _k == 'id':
if _k == "id":
continue
table.add_column(_k.capitalize())

for _k, _v in labels.items():
table.add_row(_k, *(f"{float(_v[_k2]):.4f}" for _k2 in keys if _k2 != 'id'))
table.add_row(
_k, *(f"{float(_v[_k2]):.4f}" for _k2 in keys if _k2 != "id")
)

console.rule(f"[bold green]{report['kind'].upper()} Report")
console.print(self.comparison(tree, table))
Expand Down

0 comments on commit 07f548d

Please sign in to comment.