Skip to content

Commit 601817b

Browse files
authored
fix: Fix the error message regarding immutable attribute (#1108)
Fixing some outdated information from previous iteration. `unfitted_estimator` and `fitted_estimator` are not available anymore because we use the constructor directly.
1 parent 46649ce commit 601817b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

skore/src/skore/sklearn/_estimator/report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def X_train(self):
218218
def X_train(self, value):
219219
raise AttributeError(
220220
"The X_train attribute is immutable. "
221-
"Please use the `from_unfitted_estimator` method to create a new report."
221+
f"Call the constructor of {self.__class__.__name__} to create a new report."
222222
)
223223

224224
@property
@@ -229,7 +229,7 @@ def y_train(self):
229229
def y_train(self, value):
230230
raise AttributeError(
231231
"The y_train attribute is immutable. "
232-
"Please use the `from_unfitted_estimator` method to create a new report."
232+
f"Call the constructor of {self.__class__.__name__} to create a new report."
233233
)
234234

235235
@property

0 commit comments

Comments
 (0)