JuliaAI / JuliaAI/MLJBase.jl

`MLJBase.scitype` conflict with `ScientificTypes.scitype`

Open
#1,002 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

next breaking release
Dominant language
Julia
Stars
163
Forks
46
Avg merge
1d 18h
Merged PRs (30d)
5

Description

Currently MLJBase and ScientificTypes both export scitype, which creates a name clash. This has not appeared to have caused many problems because MLJBase, which has ScientificTypes as a dependency, re-exports all the other names that ScientificTypes exports, so there is generally no need for the MLJBase user (or MLJ user) to also do using ScientificTypes. But this state of affairs is confusing, and I hit my head against it recently. The issue is that MLJBase.scitype is not just a re-export of ScientificTypes.scitype (even though the first does in fact call the latter). This has to do with the "light/full interface" switch we created to ensure MLJModelInterface could be ultra-light weight, but still refer to names in packages that aren't dependencies ... a long story I'll not go into here, except to say this "hack" has another drawback: the global variable which flags whether we are using the "light" interface (MLJBase is not loaded) or "full" interface (MLJBase is loaded) kills the benefit of adding a precompilation load to MLJ (there was an issue about this, but I cannot find it just now).

What to do about this? Probably any solution is going to create significant breakages, so probably we live with this until such time as we eliminate the "hack" referred to above, which is probably rendered unnecessary with the advent of weak dependencies and conditional code loading. But I wanted to flag this issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the scitype exports in MLJBase and ScientificTypes and the light/full interface in MLJModelInterface. Review how weak dependencies and conditional code loading could affect the existing interface and precompilation behavior. Done means an agreed resolution with its compatibility and breakage implications documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
machine-learning
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.