Files
Maxim Zhiltsov 8df8872a85 Fix predefined sorting for task data (#5083)
Fixes #5061, #4179

- Added a way to declare custom file ordering for the local task data
uploads via TUS protocol
- Added an option to use a manifest to support the `predefined` sorting
method
- This file is required for the `predefined` sorting mode with image
archives
- Fixed file ordering when tasks are created from SDK or CLI in the
`predefined` sorting mode
- Added more tests for task data uploading API

The uploading protocol is implemented:

The user specifies `sorting_method=predefined` if the task creation
request. Then the data is uploaded.

1. Client files uploading
1.1. The files are uploaded as separate files (using the TUS protocol)
or grouped files (using the `Upload-Multiple` requests).
1.2. The `Upload-Finish` request comes (or its unlabeled legacy
equivalent). The new optional field can be supplied: `upload_file_order`
- a list of strings. It allows to override the input file order, if
necessary, and is only valid with the `predefined` sorting method
specified.
1.2.1. If the field is empty or missing, the client files in the data
requests are considered ordered.
1.2.2. If the field is not empty, a list containing the file list in the
required order is expected in the `upload_file_order` field.
1.2.2.1. If there are `client_files` in the request, the files are
sorted
1.2.2.2. If file lists mismatch, an explanatory error is raised.

2. Data processing
2.1. At this point, all `*_files` are considered ordered as requested.
2.2. Require a metafile for zip uploads with predefined sorting. The
file is expected to accompany the uploaded zip file, not to be inside of
the archive.
2.3. If there is a metafile in the input data, files are ordered after
the metafile.
2.3.1. If the data is extracted from cloud, only the specified subset of
the files is kept in the manifest.
2.3.2. If the upload data doesn't exist in the metafile, an error is
raised.
2.3.3. A `job_file_mapping` has higher priority than metafile, if
specified.

Co-authored-by: Roman Donchenko <roman@cvat.ai>
2023-06-08 15:32:14 +03:00

5 lines
53 B
Plaintext

cvat-sdk/docs/
cvat-sdk/README.md
.env/
site/themes/