Skip to content

Commit

Permalink
Merge pull request #827 from mlr-org/fix/hash
Browse files Browse the repository at this point in the history
fix: hash for filters
  • Loading branch information
mb706 authored Feb 7, 2025
2 parents 2f8c355 + b421562 commit 11cdde6
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Suggests:
lme4,
mlbench,
bbotk (>= 0.3.0),
mlr3filters (>= 0.1.1),
mlr3filters (>= 0.8.1),
mlr3learners,
mlr3measures,
nloptr,
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* New PipeOp `PipeOpDecode` / `po("decode")` to reverse one-hot or treatment encoding.
* Fix: Columns that are `feature` and something else no longer lose the other column role during training or predicting of `PipeOp`s inheriting from `PipeOpTaskPreproc`.
* Fix: Made tests for `PipeOpBLSmote` deterministic.
* Fix: Corrected hash calculation for `PipeOpFilter`.

# mlr3pipelines 0.7.1

Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpFilter.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ PipeOpFilter = R6Class("PipeOpFilter",
.transform = function(task) {
task$select(self$state$features)
},
.additional_phash_input = function() class(self$filter)
.additional_phash_input = function() self$filter$hash
)
)

Expand Down
2 changes: 0 additions & 2 deletions tests/testthat/test_dictionary.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ test_that("Dictionary contains all PipeOps", {

# the loop now checks whether we can construct each pipeop from the dictionary *and* by itself
for (idx in seq_along(dictnames)) {
if (dictnames[[idx]] == "filter") next # TODO: remove this when https://github.com/mlr-org/mlr3filters/issues/162 is solved

pogen = get(pipeops[idx], pkgenv) # the constructor, as found in the package namespace
dictname = dictnames[idx] # the "key" in the mlr_pipeops dictionary
args = initargs[[pipeops[idx]]] %??% list() # the required arguments, if any. e.g. 'outnum' for PipeOpCopy.
Expand Down

0 comments on commit 11cdde6

Please sign in to comment.