Skip to content

Commit 594d9f0

Browse files
authored
Merge pull request #20 from JuliaAI/bug-fix
Fix a bug and bump 0.2.5
2 parents 045363d + a207fc4 commit 594d9f0

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MLJTestInterface"
22
uuid = "72560011-54dd-4dc2-94f3-c5de45b75ecd"
33
authors = ["Anthony D. Blaom <[email protected]>"]
4-
version = "0.2.4"
4+
version = "0.2.5"
55

66
[deps]
77
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
@@ -10,5 +10,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1010

1111
[compat]
1212
MLJBase = "0.20, 0.21, 1"
13+
Pkg = "<0.0.1, 1"
1314
Test = "<0.0.1, 1"
1415
julia = "1.6"

src/attemptors.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@ function operations(fitted_machine, data...; throw=false, verbosity=1)
9393
model = fitted_machine.model
9494
operations = String[]
9595
methods = MLJBase.implemented_methods(fitted_machine.model)
96-
if model isa Static && !(:transform in methods)
97-
push!(methods, :transform)
98-
end
9996
_, test = MLJBase.partition(1:MLJBase.nrows(first(data)), 0.5)
10097
if :predict in methods
10198
predict(fitted_machine, first(data))

test/attemptors.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ MLJBase.transform(::DummyStatic, _, x, y) = hcat(x, y)
4242
MLJBase.package_name(::Type{<:DummyStatic}) = "DummyPackage"
4343
MLJBase.load_path(::Type{<:DummyStatic}) = "DummyPackage.Some.Thing.Different"
4444

45-
struct DummyStatic2 <: Static end
46-
MLJBase.transform(::DummyStatic2, _, x, y) = hcat(x, y)
47-
MLJBase.package_name(::Type{<:DummyStatic2}) = "DummyPackage"
48-
MLJBase.load_path(::Type{<:DummyStatic2}) = "DummyPackage.Some.Thing.Different"
49-
MLJBase.implemented_methods(::Type{<:DummyStatic2}) = Symbol[]
50-
5145
struct SupervisedTransformer <: Deterministic end
5246
MLJBase.fit(::SupervisedTransformer, verbosity, X, y) = (42, nothing, nothing)
5347
MLJBase.predict(::SupervisedTransformer, _, Xnew) = fill(4.5, length(Xnew))
@@ -69,11 +63,6 @@ MLJBase.load_path(::Type{<:SupervisedTransformer}) =
6963
operations, outcome = MLJTestInterface.operations(smach, X, y)
7064
@test operations == "transform"
7165
@test outcome == ""
72-
73-
smach = machine(DummyStatic2())
74-
operations, outcome = MLJTestInterface.operations(smach, X, y)
75-
@test operations == "transform"
76-
@test outcome == ""
7766
end
7867

7968
true

0 commit comments

Comments
 (0)