Skip to content

Commit 8c15e83

Browse files
authored
Bug fix (#241)
* Fix fn _has_one_unfilled_arg in build_pipeline to correctly check the default value of the parameters Restricts the maximum version of lightgbm to 4.5 * lint fix * Update version and changelog
1 parent 64bd8c7 commit 8c15e83

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [4.0.1] - 2025-02-26
4+
- **Bug Fix**
5+
- Fix fn _has_one_unfilled_arg in build_pipeline to correctly check the default value of the parameters
6+
- Restricts the maximum version of lightgbm to 4.5
7+
38
## [4.0.0] - 2024-08-12
49
- **Enhancement**
510
- Add support for python 3.11 and 3.10

requirements_lgbm.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lightgbm>=4,<5
1+
lightgbm>=4,<4.6

src/fklearn/resources/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.0
1+
4.0.1

src/fklearn/training/pipeline.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ def build_pipeline(*learners: LearnerFnType, has_repeated_learners: bool = False
4444
"""
4545

4646
def _has_one_unfilled_arg(learner: LearnerFnType) -> None:
47-
no_default_list = [p for p, a in signature(learner).parameters.items() if a.default == '__no__default__']
47+
no_default_list = [
48+
p for p, a in signature(learner).parameters.items()
49+
if isinstance(a.default, str) and a.default == '__no__default__'
50+
]
4851
if len(no_default_list) > 1:
4952
raise ValueError("Learner {0} has more than one unfilled argument: {1}\n"
5053
"Make sure all learners are curried properly and only require one argument,"

0 commit comments

Comments
 (0)