We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e052e53 commit b699412Copy full SHA for b699412
src/setfit/model_card.py
@@ -462,12 +462,14 @@ def try_to_pure_python(value: Any) -> Any:
462
try:
463
if hasattr(value, "dtype"):
464
return value.item()
465
- except:
466
- pass
+ except Exception:
+ pass
467
return value
468
469
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()}
+ results_without_split = {
471
+ key.split("_", maxsplit=1)[1].title(): value for key, value in pure_python_results.items()
472
+ }
473
self.eval_results_dict = pure_python_results
474
self.metric_lines = [{"Label": "**all**", **results_without_split}]
475
0 commit comments