Skip to content

Commit 2774aa3

Browse files
committed
chore: Update error message from predict_param to predict_params
1 parent 318502d commit 2774aa3

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

mapie/tests/test_classification.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,9 +2087,9 @@ def test_using_one_predict_parameter_into_predict_but_not_in_fit() -> None:
20872087
mapie_fitted = mapie.fit(X_train, y_train)
20882088

20892089
with pytest.raises(ValueError, match=(
2090-
fr".*Using 'predict_param' '{predict_params}' "
2091-
r"without using one 'predict_param' in the fit method\..*"
2092-
r"Please ensure a similar configuration of 'predict_param' "
2090+
fr".*Using 'predict_params' '{predict_params}' "
2091+
r"without using one 'predict_params' in the fit method\..*"
2092+
r"Please ensure a similar configuration of 'predict_params' "
20932093
r"is used in the fit method before calling it in predict\..*"
20942094
)):
20952095
mapie_fitted.predict(X_test, agg_scores="mean", **predict_params)
@@ -2109,9 +2109,9 @@ def test_using_one_predict_parameter_into_fit_but_not_in_predict() -> None:
21092109
mapie_fitted = mapie.fit(X_train, y_train, predict_params=predict_params)
21102110

21112111
with pytest.raises(ValueError, match=(
2112-
r"Using one 'predict_param' in the fit method "
2113-
r"without using one 'predict_param' in the predict method. "
2114-
r"Please ensure a similar configuration of 'predict_param' "
2112+
r"Using one 'predict_params' in the fit method "
2113+
r"without using one 'predict_params' in the predict method. "
2114+
r"Please ensure a similar configuration of 'predict_params' "
21152115
r"is used in the predict method as called in the fit."
21162116
)):
21172117
mapie_fitted.predict(X_test)

mapie/tests/test_regression.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -979,9 +979,9 @@ def test_using_one_predict_parameter_into_predict_but_not_in_fit() -> None:
979979
mapie_fitted = mapie.fit(X_train, y_train)
980980

981981
with pytest.raises(ValueError, match=(
982-
fr".*Using 'predict_param' '{predict_params}' "
983-
r"without using one 'predict_param' in the fit method\..*"
984-
r"Please ensure a similar configuration of 'predict_param' "
982+
fr".*Using 'predict_params' '{predict_params}' "
983+
r"without using one 'predict_params' in the fit method\..*"
984+
r"Please ensure a similar configuration of 'predict_params' "
985985
r"is used in the fit method before calling it in predict\..*"
986986
)):
987987
mapie_fitted.predict(X_test, **predict_params)
@@ -1002,9 +1002,9 @@ def test_using_one_predict_parameter_into_fit_but_not_in_predict() -> None:
10021002
mapie_fitted = mapie.fit(X_train, y_train, predict_params=predict_params)
10031003

10041004
with pytest.raises(ValueError, match=(
1005-
r"Using one 'predict_param' in the fit method "
1006-
r"without using one 'predict_param' in the predict method. "
1007-
r"Please ensure a similar configuration of 'predict_param' "
1005+
r"Using one 'predict_params' in the fit method "
1006+
r"without using one 'predict_params' in the predict method. "
1007+
r"Please ensure a similar configuration of 'predict_params' "
10081008
r"is used in the predict method as called in the fit."
10091009
)):
10101010
mapie_fitted.predict(X_test)

mapie/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,15 +1400,15 @@ def check_predict_params(
14001400
if cv != "prefit":
14011401
if len(predict_params) > 0 and predict_params_used_in_fit is False:
14021402
raise ValueError(
1403-
f"Using 'predict_param' '{predict_params}' "
1404-
f"without using one 'predict_param' in the fit method. "
1405-
f"Please ensure a similar configuration of 'predict_param' "
1403+
f"Using 'predict_params' '{predict_params}' "
1404+
f"without using one 'predict_params' in the fit method. "
1405+
f"Please ensure a similar configuration of 'predict_params' "
14061406
f"is used in the fit method before calling it in predict."
14071407
)
14081408
if len(predict_params) == 0 and predict_params_used_in_fit is True:
14091409
raise ValueError(
1410-
"Using one 'predict_param' in the fit method "
1411-
"without using one 'predict_param' in the predict method. "
1412-
"Please ensure a similar configuration of 'predict_param' "
1410+
"Using one 'predict_params' in the fit method "
1411+
"without using one 'predict_params' in the predict method. "
1412+
"Please ensure a similar configuration of 'predict_params' "
14131413
"is used in the predict method as called in the fit."
14141414
)

0 commit comments

Comments
 (0)