HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
19.34k stars 2.4k forks source link

15000 YOLO annotation file export #5253

Open sujunze opened 10 months ago

sujunze commented 10 months ago

I was using curl to export 15000 yolo formatted annotation files and got an error at 2:07 curl: (28) Failed to connect to xxxx port 50005 after 127241 ms: Couldn't connect to server The export script used is curl -X GET 'http://xxx:50005/api/projects/3/export?export_type=YOLO&download_resources=false' -H 'Authorization: Token xxxx' > crowdhuman-train.zip

Clemens-E commented 10 months ago

Maybe you have to use the export snapshot API if the easy snapshot api has a timeout See https://labelstud.io/guide/export#Export-snapshots-using-the-Snapshot-API assuming the request simply times out.

If, however, the server crashes during the export, it might be: https://github.com/HumanSignal/label-studio/issues/5243

lackray commented 10 months ago

reconfig the nginx timeout parameter can fix this

hogepodge commented 10 months ago

Hi @sujunze, thanks for reaching out. For information on how to resolve export timeouts in the community edition, please refer to this page: https://labelstud.io/guide/export.html#Export-timeout-in-Community-Edition

You may also look into resetting the timeouts as suggested by @Clemens-E or @lackray.

Can you please provide us with more information such as logs to help us determine the root cause of the problem?

sujunze commented 10 months ago

The nginx timeout has been reset and is not working. Exporting 15,000 annotation files using snapshots is successful, but exporting 120,000 annotation files times out。 The following information is displayed if the system times out: requests.exceptions.ReadTimeout: HTTPConnectionPool(host='xxxx', port=50005): Read timed out. (read timeout=180.0)

AlexanderKozhevin commented 9 months ago

@sujunze How did you manage to export using snaphots. I'm having issues with that.

.../api/projects/55/exports
{
  "title": "My YOLO Export",
  "task_filter_options": {
    "finished": "only",
    "annotated": "only"
  },
  "annotation_filter_options": {
    "usual": true
  },
  "serialization_options": {
    "drafts": {
      "only_id": false
    }
  },
  "export_type": "YOLO"
}

So it creates an export - 200 response, but ignore export type