roboflow / roboflow/roboflow-python
Roboflow API fails silently when invalid annotations file is uploaded.
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 629
- Forks
- 140
- Ø Merge
- 2 T. 2 Std.
- Gemergte PRs (30 T.)
- 5
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der bereitgestellten Python-Reproduktion und verfolge den Aufruf von project.upload mit annotation_path="annotation.json". Prüfe, wie eine ungültige Anmerkungs-Payload verarbeitet und nach außen gemeldet wird; fertig ist die Aufgabe, wenn die fehlerhafte Datei nicht mehr den Anschein erweckt, erfolgreich hochgeladen worden zu sein, und ein Fehler gemeldet wird, während das gemeldete Verhalten beim erfolgreichen Upload unverändert bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100