File tree 2 files changed +26
-5
lines changed
2 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -1591,8 +1591,15 @@ function MLJModelInterface.update(
1591
1591
mach, e = fitresult
1592
1592
train_test_rows = e. train_test_rows
1593
1593
1594
- measures = e. measure
1595
- operations = e. operation
1594
+ # since `resampler.model` could have changed, so might the actual measures and
1595
+ # operations that should be passed to the (low level) `evaluate!`:
1596
+ measures = _actual_measures (resampler. measure, resampler. model)
1597
+ operations = _actual_operations (
1598
+ resampler. operation,
1599
+ measures,
1600
+ resampler. model,
1601
+ verbosity
1602
+ )
1596
1603
1597
1604
# update the model:
1598
1605
mach2 = _update! (mach, resampler. model)
Original file line number Diff line number Diff line change 1
- # module TestResampling
2
-
3
1
using Distributed
4
2
import ComputationalResources: CPU1, CPUProcesses, CPUThreads
5
3
using . TestUtilities
876
874
@test contains (printed_evaluations, " N/A" )
877
875
end
878
876
879
- # end
877
+ @testset_accelerated " issue with Resampler #954" acceleration begin
878
+ knn = KNNClassifier ()
879
+ cnst = DeterministicConstantClassifier ()
880
+ X, y = make_blobs (10 )
881
+
882
+ resampler = MLJBase. Resampler (
883
+ ;model= knn,
884
+ measure= accuracy,
885
+ operation= nothing ,
886
+ acceleration,
887
+ )
888
+ mach = machine (resampler, X, y) |> fit!
889
+
890
+ resampler. model = cnst
891
+ fit! (mach)
892
+ end
893
+
880
894
true
You can’t perform that action at this time.
0 commit comments