Skip to content

Commit

Permalink
Control parallel column transformer in filter columns
Browse files Browse the repository at this point in the history
  • Loading branch information
fraimondo committed Oct 21, 2024
1 parent f34d277 commit 165ccdb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion julearn/transformers/dataframe/filter_columns.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
JuTransformer,
ensure_column_types,
)
from ...config import get_config
from ...utils.typing import DataLike


Expand Down Expand Up @@ -53,7 +54,9 @@ def __init__(
)

def _fit(
self, X: pd.DataFrame, y: Optional[DataLike] = None # noqa: N803
self,
X: pd.DataFrame,

Check failure on line 58 in julearn/transformers/dataframe/filter_columns.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (N803)

julearn/transformers/dataframe/filter_columns.py:58:9: N803 Argument name `X` should be lowercase

Check failure on line 58 in julearn/transformers/dataframe/filter_columns.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (N803)

julearn/transformers/dataframe/filter_columns.py:58:9: N803 Argument name `X` should be lowercase
y: Optional[DataLike] = None, # noqa: N803

Check failure on line 59 in julearn/transformers/dataframe/filter_columns.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (RUF100)

julearn/transformers/dataframe/filter_columns.py:59:40: RUF100 Unused `noqa` directive (unused: `N803`)

Check failure on line 59 in julearn/transformers/dataframe/filter_columns.py

View workflow job for this annotation

GitHub Actions / lint

Ruff (RUF100)

julearn/transformers/dataframe/filter_columns.py:59:40: RUF100 Unused `noqa` directive (unused: `N803`)
) -> "FilterColumns":
"""Fit the transformer.
Expand All @@ -75,6 +78,9 @@ def _fit(
transformers=[("keep", "passthrough", apply_to_selector)],
remainder="drop",
verbose_feature_names_out=False,
n_jobs=None
if get_config("enable_parallel_column_transformers")
else 1,
)
self.filter_columns_.fit(X, y)
return self
Expand Down

0 comments on commit 165ccdb

Please sign in to comment.