forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix predefined sorting for task data (cvat-ai#5083)
Fixes cvat-ai#5061, cvat-ai#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 <[email protected]>
- Loading branch information
1 parent
04a1f0b
commit 8df8872
Showing
22 changed files
with
1,234 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
cvat-sdk/docs/ | ||
cvat-sdk/README.md | ||
.env/ | ||
site/themes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Generated by Django 3.2.18 on 2023-04-18 09:01 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('engine', '0067_alter_cloudstorage_credentials_type'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='clientfile', | ||
options={'default_permissions': (), 'ordering': ('id',)}, | ||
), | ||
migrations.AlterModelOptions( | ||
name='relatedfile', | ||
options={'default_permissions': (), 'ordering': ('id',)}, | ||
), | ||
migrations.AlterModelOptions( | ||
name='remotefile', | ||
options={'default_permissions': (), 'ordering': ('id',)}, | ||
), | ||
migrations.AlterModelOptions( | ||
name='serverfile', | ||
options={'default_permissions': (), 'ordering': ('id',)}, | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='remotefile', | ||
unique_together={('data', 'file')}, | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='serverfile', | ||
unique_together={('data', 'file')}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.