Commit b90d61d
Fix the ensemble_size == 0 error in automl.py (#1369)
* Fix the ensemble == 0 error in fit_ensemble and show_models function by adding a valueError to the former and giving a warning and returning empty dictionary in the latter
* Update automl.py
* Two tests for ensemble_size == 0 cases
Added two tests to check if the automl.fit_ensemble() raises error when ensemble_size == 0 and if show_models() returns empty dictionary when ensemble_size == 0
* Update automl.py
* Update test_automl.py
Test for checking if the show_models() functions raise an error if models are not fitted.
* Update automl.py
Add a function __sklearn_is_fitted__() which returns the boolean value of self.fitted(). And add the check for model fitting in show_models() function.
* Update autosklearn/automl.py
* Formatting changes to clear all the pre-commit tests
Co-authored-by: Eddie Bergman <eddiebergmanhs@gmail.com>1 parent 3a1d8f2 commit b90d61d
2 files changed
+67
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| 306 | + | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| |||
348 | 350 | | |
349 | 351 | | |
350 | 352 | | |
351 | | - | |
| 353 | + | |
352 | 354 | | |
353 | 355 | | |
354 | 356 | | |
| |||
562 | 564 | | |
563 | 565 | | |
564 | 566 | | |
565 | | - | |
| 567 | + | |
566 | 568 | | |
567 | 569 | | |
568 | 570 | | |
| |||
1068 | 1070 | | |
1069 | 1071 | | |
1070 | 1072 | | |
| 1073 | + | |
1071 | 1074 | | |
1072 | 1075 | | |
1073 | 1076 | | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1074 | 1080 | | |
1075 | 1081 | | |
1076 | 1082 | | |
| |||
1481 | 1487 | | |
1482 | 1488 | | |
1483 | 1489 | | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
1484 | 1494 | | |
1485 | 1495 | | |
1486 | 1496 | | |
| |||
1971 | 1981 | | |
1972 | 1982 | | |
1973 | 1983 | | |
1974 | | - | |
1975 | 1984 | | |
1976 | 1985 | | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
1977 | 1999 | | |
1978 | 2000 | | |
1979 | 2001 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
91 | 133 | | |
92 | 134 | | |
93 | 135 | | |
| |||
0 commit comments