Skip to content

Commit

Permalink
Pre-commit autoupdate (#84)
Browse files Browse the repository at this point in the history
Co-authored-by: quant-ranger[bot] <132915763+quant-ranger[bot]@users.noreply.github.com>
Co-authored-by: Pavel Zwerschke <[email protected]>
  • Loading branch information
quant-ranger[bot] and pavelzw authored Sep 11, 2023
1 parent 13443c4 commit 43491d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: trailing-whitespace
- id: check-toml
- repo: https://github.com/quantco/pre-commit-mirrors-ruff
rev: 0.0.284
rev: 0.0.287
hooks:
- id: ruff-conda
- repo: https://github.com/quantco/pre-commit-mirrors-black
Expand Down
4 changes: 2 additions & 2 deletions slim_trees/lgbm_booster.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _compress_booster_state(state: dict):
For a given state dictionary, store data in a structured format that can then
be saved to disk in a way that can be compressed.
"""
assert type(state) == dict
assert isinstance(state, dict)
compressed_state = {k: v for k, v in state.items() if k != _handle_key_name}
compressed_state["compressed_handle"] = _compress_booster_handle(
state[_handle_key_name]
Expand All @@ -80,7 +80,7 @@ def _compress_booster_state(state: dict):


def _decompress_booster_state(compressed_state: dict):
assert type(compressed_state) == dict
assert isinstance(compressed_state, dict)
state = {k: v for k, v in compressed_state.items() if k != "compressed_handle"}
state[_handle_key_name] = _decompress_booster_handle(
compressed_state["compressed_handle"]
Expand Down

0 comments on commit 43491d7

Please sign in to comment.