roboflow / roboflow/roboflow-python
Roboflow API fails silently when invalid annotations file is uploaded.
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 629
- Fork
- 140
- Merge medio
- 2g 2h
- PR unite (30g)
- 5
Descrizione
Likely something to be passed to the back-end team.
When debugging the annotations format, it would be useful to know when an incorrect file was uploaded. Even if it did not tell what exactly was wrong. As it stands, it now fails silently, as if annotation were applied.
Test
import json
import roboflow
rf = roboflow.Roboflow(api_key="API_KEY")
img_path = "<path_to_img>"
workspace_id = "<ws ID>"
project_id = "<proj ID>"
workspace = rf.workspace(workspace_id)
project = workspace.project(project_id)
annotation = {
"it is": [
{
"very frustrating": 0,
"when you": "send",
"an annotation": {
"file and": 0.5,
"function": 0.5,
"call": 0.5,
"completes": 0.5,
"successfully,": 0.5,
},
"but": "there's",
"no": "annotations",
"on": "the website",
"nor": "any",
"errors": "raised",
}
]
}
with open("annotation.json", "w") as f:
json.dump(annotation, f)
image = project.upload(img_path, annotation_path="annotation.json")
This passes.
Guida per i contributori
Apri 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.
Direzione di ricerca
Inizia con la riproduzione Python fornita e traccia la chiamata a project.upload usando annotation_path="annotation.json". Verifica come viene gestito e segnalato un payload di annotazione non valido; il lavoro è completato quando il file malformato non risulta più essere stato caricato correttamente e viene segnalato un errore, mentre il comportamento riportato per un caricamento valido rimane invariato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100