tuple/table ambiguity
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- julia
- Domain
- machine-learning
Research direction
Reproduce the scitype((t,)) and schema((t,)) examples from the issue, then trace the scitype and schema entry points that classify tuples and tables. Compare the result with the intended Tuple{scitype(t)} behavior and the MLJBase compatibility use case; done requires an agreed rule for resolving this ambiguity and corresponding validation.
Written by the indexing model from the issue text.
Description
The scitype of a tuple is intended to be the Tuple of the element scitypes. For example:
julia> scitype((1.0, 4))
Tuple{Continuous, Count}
By this logic, if I create a 1-tuple with a table t as it's single element, then this tuple should have Tuple{scitype(t)}. But this isn't always the case:
t = (x=[1, 2], y=["a", "b"])
julia> scitype(t)
Table{Union{AbstractVector{Count}, AbstractVector{Textual}}}
julia> scitype((t,))
Table{Union{AbstractVector{AbstractVector{Count}}, AbstractVector{AbstractVector{Textual}}}}
The problem is that (t, ) is also a table (with one row):
julia> schema((t,))
┌───────┬─────────────────────────┬────────────────┐
│ names │ scitypes │ types │
├───────┼─────────────────────────┼────────────────┤
│ x │ AbstractVector{Count} │ Vector{Int64} │
│ y │ AbstractVector{Textual} │ Vector{String} │
└───────┴─────────────────────────┴────────────────┘
This is pretty awful 😢 . For example it makes it tricky, in MLJBase, to use the fit_data_scitype of models, to check compatibility of a model with data, as in https://github.com/JuliaAI/MLJBase.jl/pull/731 . That is, the test scitype(data) <: fit_data_scitype(model) where data is the tuple of data arguments, is not reliable.
- Dominant language
- Julia
- Stars
- 99
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaAI/ScientificTypes.jl
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
JuliaAI/ScientificTypes.jl#204 · 1 comment ·
-
next breaking release
Difficulty 5/5 Over a week Newbie friendliness 20/100
JuliaAI/ScientificTypes.jl#195 ·
-
next breaking release
Difficulty 5/5 Over a week Newbie friendliness 25/100
JuliaAI/ScientificTypes.jl#194 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
JuliaAI/ScientificTypes.jl#192 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
JuliaAI/ScientificTypes.jl#180 · 21 comments ·
All issues in JuliaAI/ScientificTypes.jl
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Sienna-Platform/PowerSimulations.jl#1737 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FluxML/Optimisers.jl#254 ·
-
Minor: floodplain warning percentage, scalar output error message and a never-true identity checkOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
JuliaAI/MLJTransforms.jl#101 ·
Maintainers usually reply within 1 day
-
@contents blocks fail to render on Julia 1.14Possibly taken @sbfnk claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
LuxDL/DocumenterVitepress.jl#410 ·