JuliaDiff / JuliaDiff/ChainRulesTestUtils.jl

Make replace boolean `check_inferred` with something that allows configuable small unions

Open
#283 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Julia
Stars
50
Forks
18
PR merge metrics
No merged PRs in 30d

Description

occured to me during https://github.com/JuliaDiff/ChainRules.jl/pull/717
that there are like 3 states we really care about:

  1. Doesn't infer at all, so infers to Any or some UnionAll or abstract type
  2. Infers down to a small union of <4 types, so the small union optimization kicks in
  3. Infers down to a single concrete type

The current check_inferred boolean doesn't allow us to distinguish case 1 from case 2.

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 reviewing the current check_inferred implementation and the context in ChainRules.jl pull request 717. Define how configuration distinguishes no inference, inference to a small union of fewer than four types, and inference to one concrete type; done means callers can reliably tell these three cases apart.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
testing
Issue type
Feature
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.