crps_cnormal ignores the backend argument for the tail masses
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 20/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Ambito
- backend, machine-learning
Direzione di ricerca
Read crps_cnormal and compare it with crps.gtcnormal, as the issue names both as relevant entry points. Check how the two _norm_cdf calls handle converted inputs and the requested backend. Done means the torch reproducer works with gradient-requiring tensors; pull request #142 is already open for this issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
crps_cnormal computes the censored masses with stats._norm_cdf(...) but doesn't pass backend on, so it uses the globally active backend (numpy by default) instead of the one requested. With torch tensors this goes through numpy, which fails for tensors that need gradients (and for GPU tensors). This is the same kind of bug as #98.
Suggested fix: pass backend=backend to both _norm_cdf calls, after converting the inputs with B.asarray, as crps.gtcnormal does.
Minimal reproducer
import torch
import scoringrules as sr
sr.register_backend("torch")
obs = torch.zeros(3)
mu = torch.zeros(3, requires_grad=True)
sigma = torch.ones(3)
# the active backend is still numpy
sr.crps_cnormal(obs, mu, sigma, -1.0, 1.0, backend="torch")
Backend
torch
Python version
3.12
scoringrules version
0.11.0
- Lingua principale
- Python
- Stelle
- 108
- Fork
- 15
- Merge medio
- 1h 42m
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di frazane/scoringrules
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
frazane/scoringrules#164 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
frazane/scoringrules#163 ·
I maintainer di solito rispondono entro 1 giorno
-
backend:torch bug documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
frazane/scoringrules#146 ·
I maintainer di solito rispondono entro 1 giorno
-
Bugs in the legacy TorchBackendForse già presa @frazane l’ha presa oggi. Apertabackend:torch bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
frazane/scoringrules#147 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
frazane/scoringrules#145 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di frazane/scoringrules
Issue simili
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)Forse già presa @geyazheng l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
langchain-ai/langchain-aws#1469 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
b4b usability
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
fix(schedule): align list_tasks since cursor filter boundary from strict > to >=Forse già presa @bfs2021 l’ha presa oggi. Apertaagent-ready bug p2 schedule
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
allenporter/supernote#540 ·
I maintainer di solito rispondono entro 1 giorno
-
The docs build fails: ecc's live inventory dropped the ecc.ecc names btclib's pinned ecc usesForse già presa @fametrano l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
btclib-org/btclib#2968 ·
I maintainer di solito rispondono entro 1 giorno