You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The param scores has a type hint of Optional and a default value of None, but is not allowed to be unset. Perhaps this should not be an optional param. However, changing the order of params could break existing code, and keeping its position requires a default value. Otherwise, classification report must not have a default value which could break existing code as well. This is a low priority issue so it can be closed if there's no good solution here
class Result:
def __init__(
self,
main_score: float,
detailed_results: str,
classification_report: Optional[dict] = None,
scores: Optional[dict] = None,
) -> None:
classification_report = classification_report if classification_report is not None else {}
assert scores is not None and "loss" in scores, "No loss provided."
The text was updated successfully, but these errors were encountered:
The param
scores
has a type hint ofOptional
and a default value ofNone
, but is not allowed to be unset. Perhaps this should not be an optional param. However, changing the order of params could break existing code, and keeping its position requires a default value. Otherwise, classification report must not have a default value which could break existing code as well. This is a low priority issue so it can be closed if there's no good solution hereThe text was updated successfully, but these errors were encountered: