Skip to content

Commit b699412

Browse files
committed
Run formatting
1 parent e052e53 commit b699412

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/setfit/model_card.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,14 @@ def try_to_pure_python(value: Any) -> Any:
462462
try:
463463
if hasattr(value, "dtype"):
464464
return value.item()
465-
except:
466-
pass
465+
except Exception:
466+
pass
467467
return value
468468

469469
pure_python_results = {key: try_to_pure_python(value) for key, value in results.items()}
470-
results_without_split = {key.split("_", maxsplit=1)[1].title(): value for key, value in pure_python_results.items()}
470+
results_without_split = {
471+
key.split("_", maxsplit=1)[1].title(): value for key, value in pure_python_results.items()
472+
}
471473
self.eval_results_dict = pure_python_results
472474
self.metric_lines = [{"Label": "**all**", **results_without_split}]
473475

0 commit comments

Comments
 (0)