Improve vector field adaptors to not require caching
Maintainers usually reply within 6 days
Nobody has claimed this yet.
- #1802 by @aniketpandey05 — closed without merging
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start by reading the existing vector field adaptors and their caching behavior, then review the related proposals in #1446 and #1482. Done means the interface separates setup or fitting from score evaluation and allows wrapped estimators to perform one-time preprocessing before sampling.
Written by the indexing model from the issue text.
Description
Refactor vector field potential to allow estimating hyperparameters once.
By now we have quite a few methods to post-hoc adapt the score/vf to allow iid observations or in #1446 #1482 to allow post-hoc prior/likelihood modifications. All of this will wrap the original estimator, modify its output, and return a modified score.
Yet for some methods like Gauss or PriorGuide we have to do some "nontrivial" preprocessing/hyperparameter optimization before one can start to sample. This is currently made possible via caching i.e. such that only the first call is delayed.
This works, but it is brittle:
- it hides expensive initialization behind the first evaluation,
- it makes execution order matter in subtle ways,
- and it couples correctness to correct cache behavior.
Additionally the sample method/params as keyword now becomes quite overloaded so it might make sense to introduce an new improved API i.e. as suggested in #1482 via posterior.with_iid("$METHOD",...).sample or posterior.with_guidance("$METHOD",...).sample
Goals
- Design an interface that separates setup / fitting from score evaluation (i.e. a
initmethod for the potential before sampling) - Allow wrapped estimators to run one-time preprocessing before sampling
- Dominant language
- Python
- Stars
- 894
- Forks
- 306
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 61
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 sbi-dev/sbi
-
simulate_for_sbi(num_simulations=0) returns 1D empty theta/x tensors and breaks append_simulationsOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sbi-dev/sbi#2310 · 3 comments ·
Maintainers usually reply within 6 days
-
bug: RestrictionEstimator.train(subsample_invalid_sims="auto") raises TypeErrorPossibly taken @Nitesh780 claimed this 2 days ago. Openbug
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
sbi-dev/sbi#2309 · 1 comment ·
Maintainers usually reply within 6 days
-
TARP reference sampling fails when a parameter coordinate is fixedPossibly taken @Jayant-kernel claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
sbi-dev/sbi#2264 · 2 comments ·
Maintainers usually reply within 6 days
-
fix: broadcast UniformNormalConvolution batch shapePossibly taken @studentarijitpaul claimed this 32 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
sbi-dev/sbi#2151 · 2 comments ·
Maintainers usually reply within 6 days
-
bug
sbi-dev/sbi#2321 · 1 comment ·
Maintainers usually reply within 6 days
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day