Skip to content

Commit

Permalink
Release/2.3.1 (#230)
Browse files Browse the repository at this point in the history
* Release/2.3.1

* lint fix

* ignore mypy in lgbm learner

* use type-checking
  • Loading branch information
fpingas committed Apr 11, 2023
1 parent 83416a1 commit 8fe0823
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [2.3.1] - 2023-04-11
- **Bugfix**
- Remove incorrect `lightgbm` import from common paths

## [2.3.0] - 2023-03-28
- **Enhacement**
- Bump maximum allowed `scikit-learn`
Expand Down
2 changes: 1 addition & 1 deletion src/fklearn/resources/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0
2.3.1
9 changes: 6 additions & 3 deletions src/fklearn/training/classification.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import List, Any, Optional, Callable, Tuple, Union
from typing import List, Any, Optional, Callable, Tuple, Union, TYPE_CHECKING

import numpy as np
import pandas as pd
from lightgbm import Booster
from pathlib import Path
from toolz import curry, merge, assoc
from sklearn.feature_extraction.text import TfidfVectorizer
Expand All @@ -14,6 +13,10 @@
from fklearn.training.utils import log_learner_time, expand_features_encoded


if TYPE_CHECKING:
from lightgbm import Booster


@curry
@log_learner_time(learner_name='logistic_classification_learner')
def logistic_classification_learner(df: pd.DataFrame,
Expand Down Expand Up @@ -513,7 +516,7 @@ def lgbm_classification_learner(df: pd.DataFrame,
Callable[[np.ndarray, pd.DataFrame], Tuple[str, float, bool]],
List[Callable[[np.ndarray, pd.DataFrame], Tuple[str, float, bool]]]]
] = None,
init_model: Optional[Union[str, Path, Booster]] = None,
init_model: Optional[Union[str, Path, 'Booster']] = None,
feature_name: Union[List[str], str] = 'auto',
categorical_feature: Union[List[str], List[int], str] = 'auto',
keep_training_booster: bool = False,
Expand Down
2 changes: 1 addition & 1 deletion tests/training/test_classification.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from collections import Counter

import lightgbm
import numpy as np
import pandas as pd

Expand Down Expand Up @@ -487,6 +486,7 @@ def test_lgbm_classification_learner():


def test_lgbm_classification_learner_params():
import lightgbm
# Test input parameters

df = pd.DataFrame(
Expand Down

0 comments on commit 8fe0823

Please sign in to comment.