-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix predefined sorting for task data #5083
Conversation
Problems:
Possible solutions:
REJECTED: Too obligatory for users. We want to avoid using metafiles until really necessary 2.1. Require an upload spec (a request) for TUS uploads 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. BEING TESTED @nmanovic , @SpecLad , @azhavoro - do you have any comments about the new solution? |
Is the |
It's hard to say, probably no. We could encode |
I decided to remove the backward compatibility mode. It turned out that Django was sorting the |
Extracted from cvat-ai#5083 Related cvat-ai#5096 - Improved dataset manifest docs - Dataset manifest requirements are now installed in the server image - Package dependencies are aligned with the server
Extracted from cvat-ai#5083 - Added a default arg for task data uploading - Added an option to wait for the data processing in task data uploading - Moved data splitting by requests for TUS closer to the point of use
Extracted from cvat-ai#5083 - Fixed test data placement in tests - Fixed cache cleaning in tests - Refactored server API tests and dataset_manifest - Added more tests
keeping old behavior for cvat versions < 2.4.6 because of cvat bug fix cvat-ai/cvat#5083 Change-Id: I542695437c05c09bb48023d598af479965abb384
keeping old behavior for cvat versions < 2.4.6 because of cvat bug fix cvat-ai/cvat#5083 Change-Id: I542695437c05c09bb48023d598af479965abb384
keeping old behavior for cvat versions < 2.4.6 because of cvat bug fix cvat-ai/cvat#5083 Change-Id: I542695437c05c09bb48023d598af479965abb384
Motivation and context
Fixes #5061, #4179
predefined
sorting methodpredefined
sorting mode with image archivespredefined
sorting modeThe uploading protocol is implemented:
The user specifies
sorting_method=predefined
if the task creation request. Then the data is uploaded.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 thepredefined
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 sorted1.2.2.2. If file lists mismatch, an explanatory error is raised.
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.How has this been tested?
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.