Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed May 22, 2024
1 parent 0ed2976 commit 39e4d20
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
# mypy
- id: mypy
name: mypy
entry: pixi run -e default mypy --ignore-missing-imports --scripts-are-modules
entry: pixi run -e default mypy
language: system
types: [python]
require_serial: true
Expand Down
2 changes: 1 addition & 1 deletion examples/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import lightgbm as lgb
from sklearn.ensemble import GradientBoostingRegressor, RandomForestRegressor
from utils import generate_dataset

from examples.utils import generate_dataset
from slim_trees import dumps_lgbm_compressed, dumps_sklearn_compressed
from slim_trees.pickling import dumps_compressed, get_pickled_size, loads_compressed

Expand Down
4 changes: 2 additions & 2 deletions examples/pickle_lgbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

import lightgbm as lgb
from lightgbm import Booster
from utils import (

from examples.utils import (
evaluate_compression_performance,
evaluate_prediction_difference,
generate_dataset,
)

from slim_trees import dump_lgbm_compressed
from slim_trees.lgbm_booster import dump
from slim_trees.pickling import load_compressed
Expand Down
4 changes: 2 additions & 2 deletions examples/pickle_sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import tempfile

from sklearn.ensemble import RandomForestRegressor
from utils import (

from examples.utils import (
evaluate_compression_performance,
evaluate_prediction_difference,
generate_dataset,
)

from slim_trees import dump_sklearn_compressed
from slim_trees.pickling import load_compressed
from slim_trees.sklearn_tree import dump
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ indent-style = "space"
python_version = "3.8"
no_implicit_optional = true
check_untyped_defs = true
scripts_are_modules = true

[[tool.mypy.overrides]]
# https://github.com/scikit-learn/scikit-learn/issues/16705
module = "sklearn.*"
module = ["sklearn.*"]
ignore_missing_imports = true

0 comments on commit 39e4d20

Please sign in to comment.