JuliaAI / JuliaAI/ScientificTypesBase.jl

Proposal for different handling of scitype conventions

Open
#17 2 comments 1 reaction 1 assignee View on GitHub

@OkonSamuel is already working on this.

Since Sep 22, 2021.

Dominant language
Julia
Stars
10
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Currently the possibility of allowing for different scitype conventions is handled by dispatch on a Convention object C, returned by convention() whose value can be changed by the user:

scitype(X;    kw...) = scitype(X, convention();     kw...)

@OkonSamuel, who has been profiling key ScientificTypes performance, has pointed out to me that this is overkill: It allows for the possibility of changing one's convention at run time (for which it is very hard to imaging a use case) but at the cost of some type-instability related loss in performance. It is therefore suggested that a convention should just means a set of overloadings of scitype(X; kw...) (instead of scitype(X, MyConvention(); kw...)) and choosing a convention means choosing the package which does the overloading (which commits the user to the convention once the package is imported).

Apart from performance benefits, this would also simplify code.

Although this is a breaking change, as far as I know this would currently effect only ScientificTypes - the only convention-providing package I know of.

Still, I would like to flag this in case there are objections to moving forward or other suggestions.

cc @OkonSamuel @juliohm @tlienart

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.