Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
- package-ecosystem: "julia"
directories: # Location of Julia projects
- "/"
- "/docs"
schedule:
interval: "weekly"
16 changes: 0 additions & 16 deletions .github/workflows/CompatHelper.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v2
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/cache@v3
env:
cache-name: cache-artifacts
with:
Expand All @@ -42,15 +42,15 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v7
with:
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: '1'
- uses: julia-actions/julia-buildpkg@v1
Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MLJModelInterface"
uuid = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"
authors = ["Thibaut Lienart and Anthony Blaom"]
version = "1.12.1"
version = "1.12.2"

[deps]
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Expand All @@ -17,12 +17,12 @@ DataFrames = "1"
Distances = "0.10"
InteractiveUtils = "<0.0.1, 1"
Markdown = "<0.0.1, 1"
OrderedCollections = "1"
OrderedCollections = "1,2"
REPL = "<0.0.1, 1"
Random = "<0.0.1, 1"
ScientificTypes = "3"
ScientificTypesBase = "3"
StatisticalTraits = "3.5"
StatisticalTraits = "3.5, 4.0"
Tables = "1"
Test = "<0.0.1, 1"
julia = "1.6"
Expand Down
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"

[compat]
Documenter = "1.17.0"
2 changes: 1 addition & 1 deletion docs/src/implementing_a_data_front_end.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The fallback is `reformat(model, args...) = args` (i.e., slurps provided data).
arguments are `reformat`ed versions of user-supplied data. For
example, in the supervised case, `data_new` in
`predict(model::SomeModelType, fitresult, data_new)` is
`reformat(model, Xnew)`, where `Xnew` is the data provided by the MLJ
`reformat(model, Xnew)[1]`, where `Xnew` is the data provided by the MLJ
user in a call `predict(mach, Xnew)` (`mach.model == model`).

- To specify how the model-specific representation of data is to be
Expand Down
5 changes: 3 additions & 2 deletions src/equality.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ end
# equality and a corresponding definition of `in`.
Base.isequal(m1::MLJType, m2::MLJType) = (m1 === m2)

# Note: To prevent julia crash, it seems we need to annotate the type
# of itr:
function special_in(x, itr)::Union{Bool,Missing}
for y in itr
ismissing(y) && return missing
Expand All @@ -154,9 +152,12 @@ function special_in(x, itr)::Union{Bool,Missing}
return false
end

# Note: To address some method ambiguities, it seems we need to annotate
# the type of itr:
Base.in(x::MLJType, itr::Set) = special_in(x, itr)
Base.in(x::MLJType, itr::AbstractVector{<:MLJType}) = special_in(x, itr)
Base.in(x::MLJType, itr::AbstractRange{<:MLJType}) = special_in(x, itr)
Base.in(x::MLJType, itr::Base.ReshapedArray{<:MLJType,1}) = special_in(x, itr)
Base.in(x::MLJType, itr::Tuple) = special_in(x, itr)
Base.in(x::MLJType, itr::Tuple{(Any for _ in 1:32)..., Vararg{Any}}) = special_in(x, itr)

Expand Down
Loading