Skip to content
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

Validation management core #8471

Merged
merged 343 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
343 commits
Select commit Hold shift + click to select a range
65b4591
Remove unused imports
zhiltsov-max Aug 19, 2024
c5fa228
Update test assets
zhiltsov-max Aug 19, 2024
bf09a38
Update server schema
zhiltsov-max Aug 19, 2024
abb214f
Fix formatting
zhiltsov-max Aug 20, 2024
92a19f4
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Aug 21, 2024
441d0e7
Allow calling flushall in redis in helm tests
zhiltsov-max Aug 21, 2024
1d29c2f
Refactor field definition
zhiltsov-max Aug 21, 2024
d81e1da
Update server schema
zhiltsov-max Aug 21, 2024
0963f94
Update comment
zhiltsov-max Aug 21, 2024
0d78e63
Update redis cleanup command
zhiltsov-max Aug 21, 2024
b9ca46c
Merge branch 'develop' into zm/validation-api
zhiltsov-max Aug 21, 2024
f53948d
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Aug 23, 2024
3ce0864
Merge branch 'develop' into zm/validation-api
zhiltsov-max Aug 23, 2024
ef0dce9
Merge branch 'zm/validation-api' into zm/validation-core
zhiltsov-max Aug 23, 2024
e69f2b7
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Aug 23, 2024
68cb59b
Merge branch 'zm/validation-core' into zm/honeypot
zhiltsov-max Aug 23, 2024
1a9a813
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Aug 23, 2024
3caab1b
Implement task creation with honeypot
zhiltsov-max Aug 23, 2024
de1bf68
Support task creation with GT job, add request validation
zhiltsov-max Aug 26, 2024
1c32114
Update server schema
zhiltsov-max Aug 26, 2024
ab3066a
Remove extra files
zhiltsov-max Aug 26, 2024
d3b58bc
Add support for gt job creation with new params, rename percent to share
zhiltsov-max Aug 28, 2024
bb48ae6
Refactor serializers
zhiltsov-max Aug 28, 2024
81e1692
Add more validations, rename model fields after api changes
zhiltsov-max Aug 28, 2024
f84d93f
Update api schema
zhiltsov-max Aug 28, 2024
be7ebb3
Improve validation messages, fix error
zhiltsov-max Aug 28, 2024
e4db8ad
Reuse _get
zhiltsov-max Aug 28, 2024
b1c54f9
Make get_checksum private
zhiltsov-max Aug 28, 2024
5312b00
Add get_raw_data_dirname to the Data model
zhiltsov-max Aug 28, 2024
3c117fe
Make SegmentFrameProvider available in make_frame_provider
zhiltsov-max Aug 28, 2024
98eff81
Remove extra variable
zhiltsov-max Aug 28, 2024
316ec78
Include both cases of CVAT_ALLOW_STATIC_CACHE in CI checks
zhiltsov-max Aug 28, 2024
ebed825
Merge remote-tracking branch 'origin/zm/job-chunks' into zm/job-chunks
zhiltsov-max Aug 28, 2024
92f6083
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Aug 28, 2024
2b6e987
Remove extra import
zhiltsov-max Aug 28, 2024
5986f63
Support backups
zhiltsov-max Aug 30, 2024
26ffb22
Fix restoring from backups
zhiltsov-max Sep 2, 2024
274237c
Make field optional in job update checks
zhiltsov-max Sep 2, 2024
1c36f81
Add export support
zhiltsov-max Sep 2, 2024
acc0697
Support import and export in tasks with gt pool
zhiltsov-max Sep 4, 2024
876164e
Support honeypot updates in jobs
zhiltsov-max Sep 4, 2024
915abdf
Refactor some code
zhiltsov-max Sep 4, 2024
c42f20b
Split the honeypot updating part
zhiltsov-max Sep 5, 2024
30dc7a7
Add API for editing and reporting of honeypots in jobs
zhiltsov-max Sep 5, 2024
f67a1a2
Update changelog
zhiltsov-max Sep 5, 2024
d72fe85
Refactor cache keys in media cache
zhiltsov-max Sep 5, 2024
d5bfb88
Refactor selective segment chunk creation
zhiltsov-max Sep 5, 2024
c5a1197
Remove the breaking change in the chunk retrieval API, add a new inde…
zhiltsov-max Sep 6, 2024
a5cf3b7
Update UI to use the new chunk index parameter
zhiltsov-max Sep 7, 2024
069f48c
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Sep 7, 2024
cfdde3f
Update test initialization
zhiltsov-max Sep 7, 2024
843b957
Update changelog
zhiltsov-max Sep 7, 2024
feb92cd
Add backward compatibility for chunk "number" in GT jobs, remove plac…
zhiltsov-max Sep 9, 2024
2424f2b
Update UI to support job chunks with non-sequential frame ids
zhiltsov-max Sep 9, 2024
fe60bdf
Fix job frame retrieval
zhiltsov-max Sep 9, 2024
6ddb6bf
Fix 3d task chunk writing
zhiltsov-max Sep 9, 2024
4fa7b97
Fix frame retrieval in UI
zhiltsov-max Sep 10, 2024
32f1be2
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Sep 10, 2024
4ff0767
Merge branch 'zm/job-chunks' into zm/validation-core
zhiltsov-max Sep 11, 2024
39e8f65
Fix gt job segment type for honeypot gt jobs
zhiltsov-max Sep 11, 2024
1b08e22
Fix chunk availability check
zhiltsov-max Sep 11, 2024
0e95b40
Fix chunk availability check
zhiltsov-max Sep 11, 2024
21135b7
Merge remote-tracking branch 'origin/zm/job-chunks' into zm/job-chunks
zhiltsov-max Sep 11, 2024
f775dcf
Add data access tests with honeypot tasks
zhiltsov-max Sep 11, 2024
c87de20
Fix linter errors
zhiltsov-max Sep 11, 2024
b311f1e
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Sep 11, 2024
f9f5001
Add task creation tests
zhiltsov-max Sep 12, 2024
79bb1f7
Remove array comparisons
zhiltsov-max Sep 12, 2024
55a8424
Update validateFrameNumbers
zhiltsov-max Sep 12, 2024
add5ae6
Use builtins for range and binary search, convert frame step into a c…
zhiltsov-max Sep 12, 2024
643d998
Merge remote-tracking branch 'origin/zm/job-chunks' into zm/job-chunks
zhiltsov-max Sep 12, 2024
27f733a
Disallow manual validation frame selection for gt job when task is cr…
zhiltsov-max Sep 12, 2024
17cc539
Update server api descriptions
zhiltsov-max Sep 12, 2024
df90b33
Fix cached chunk indicators in frame player
zhiltsov-max Sep 12, 2024
6ccb7db
Fix chunk predecode logic
zhiltsov-max Sep 13, 2024
1fb68bc
Rename chunkNumber to chunkIndex where necessary
zhiltsov-max Sep 13, 2024
92d0c7a
Fix potential prefetch problem with reverse playback
zhiltsov-max Sep 13, 2024
67c1650
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Sep 13, 2024
62bfb45
Change the way validation layout is stored in the DB
zhiltsov-max Sep 13, 2024
03f58ed
Add tests for task creation with gt job from video, fix frames_per_jo…
zhiltsov-max Sep 13, 2024
cbd75cd
Update data migration
zhiltsov-max Sep 13, 2024
7f2e42e
Update gt job removal
zhiltsov-max Sep 13, 2024
6cc0012
Sort gt job frames regardless
zhiltsov-max Sep 13, 2024
5322e82
Add test task with honeypots
zhiltsov-max Sep 13, 2024
057bbb5
Add backup test for honeypot task
zhiltsov-max Sep 13, 2024
b9f6f8b
Fixes
zhiltsov-max Sep 13, 2024
63c15ec
Fix backup restoring for custom jobs without honeypots
zhiltsov-max Sep 14, 2024
5a7a419
Fix gt annotation copying on task annotation uploading
zhiltsov-max Sep 14, 2024
c297dac
Fix validation frames fetching on task creation
zhiltsov-max Sep 14, 2024
0313ffa
Refactor tests, add make_sdk_client function
zhiltsov-max Sep 14, 2024
814a5db
Add tests for annotation updating in honeypot tasks
zhiltsov-max Sep 14, 2024
3cdc4dc
Move env variable into docker-compose.yml
zhiltsov-max Sep 16, 2024
716042e
Merge remote-tracking branch 'origin/zm/job-chunks' into zm/job-chunks
zhiltsov-max Sep 16, 2024
19279c7
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Sep 16, 2024
edaa8d0
Add test for import and export of annotations in honeypot tasks
zhiltsov-max Sep 16, 2024
6deaf8e
Update tasks with GT jobs in tests assets
zhiltsov-max Sep 16, 2024
e6c4cdb
Fix backup restoring
zhiltsov-max Sep 16, 2024
b8a25cf
Revert unnecessary backup file copying change
zhiltsov-max Sep 16, 2024
28a4a61
Fix lambda tests, use relative ids in manual gt job creation
zhiltsov-max Sep 16, 2024
bc5ed39
Fix invalid cached chunk display in GT jobs
zhiltsov-max Sep 17, 2024
08ddd28
Fix invalid task preview generation
zhiltsov-max Sep 17, 2024
1d969bd
Refactor CS previews, context image chunk generation, media cache cre…
zhiltsov-max Sep 17, 2024
e2cba8c
Merge remote-tracking branch 'origin/zm/job-chunks' into zm/job-chunks
zhiltsov-max Sep 17, 2024
d135475
Remove extra import
zhiltsov-max Sep 17, 2024
a1638c9
Fix CS preview in response
zhiltsov-max Sep 17, 2024
fc89c01
Add reverse migration
zhiltsov-max Sep 17, 2024
f8878d0
Merge branch 'zm/job-chunks' into zm/validation-core
zhiltsov-max Sep 17, 2024
c6e65f6
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Sep 17, 2024
85a6244
Add gt job creation tests, update job tests
zhiltsov-max Sep 17, 2024
2679ff4
Update imports
zhiltsov-max Sep 17, 2024
39c8572
Python 3.8 compatibility
zhiltsov-max Sep 17, 2024
169b22c
Python 3.8 compatibility
zhiltsov-max Sep 18, 2024
ee822ac
Support mapped frames in static chunk creation
zhiltsov-max Sep 18, 2024
9f19081
Improve test task names in fixtures
zhiltsov-max Sep 18, 2024
e38f2f9
Add backward compatibility alias for the seed field in job creation
zhiltsov-max Sep 19, 2024
5986866
Restore old test
zhiltsov-max Sep 19, 2024
5bba804
Update ui
zhiltsov-max Sep 20, 2024
ce5cf05
Merge branch 'zm/validation-core' into zm/validation-management-core
zhiltsov-max Sep 20, 2024
b16c0fa
send uploadstart/uploadfinish requests in json format
klakhov Sep 20, 2024
6d80d66
Remove comment
zhiltsov-max Sep 20, 2024
9bdfbaf
Fix task creation with validation params
zhiltsov-max Sep 20, 2024
2415260
Improve frame_per_job_share handling
zhiltsov-max Sep 20, 2024
be0f543
Fix allocation table building
zhiltsov-max Sep 20, 2024
6e9194e
Fix gt management values
zhiltsov-max Sep 20, 2024
118828a
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Sep 23, 2024
7308b76
Rename real_frame_id to real_frame for consistency
zhiltsov-max Sep 23, 2024
e447473
Support frame deletion in GT jobs
zhiltsov-max Sep 23, 2024
7aaccbd
Update ui support for frame removal
zhiltsov-max Sep 23, 2024
4667650
Update test assets
zhiltsov-max Sep 23, 2024
170e73b
Merge remote-tracking branch 'origin/develop' into zm/validation-core
zhiltsov-max Sep 23, 2024
dd39291
Fix linter problems
zhiltsov-max Sep 23, 2024
3eea60d
Merge branch 'develop' into zm/job-chunks
zhiltsov-max Sep 24, 2024
cc5637a
Enable job metadata updates in tasks with gt job and honeypots
zhiltsov-max Sep 24, 2024
7535d09
Fix test
zhiltsov-max Sep 24, 2024
8054be9
Merge branch 'zm/job-chunks' into zm/validation-core
zhiltsov-max Sep 25, 2024
4f5d642
Merge branch 'develop' into zm/validation-core
zhiltsov-max Sep 25, 2024
1910dcd
Add tests for gt frame exclusion
zhiltsov-max Sep 25, 2024
7be49e2
Fix test
zhiltsov-max Sep 25, 2024
8f784d9
Fix linter error
zhiltsov-max Sep 25, 2024
0de8f0e
Merge branch 'zm/validation-core' into zm/validation-management-core
zhiltsov-max Sep 25, 2024
26ecf67
Fix merge
zhiltsov-max Sep 25, 2024
07a997f
Support chunk update date in task and job meta
zhiltsov-max Sep 25, 2024
ace52d4
Enable honeypot reporting and editing for a job
zhiltsov-max Sep 25, 2024
c37a18f
Add new endpoints for honeypot management
zhiltsov-max Sep 26, 2024
81e2cf1
Update deleted frames when random frames selection is used
zhiltsov-max Sep 27, 2024
359f2d4
Make chunk checksum computation more reliable
zhiltsov-max Sep 27, 2024
c475ae0
Make migration more correct
zhiltsov-max Sep 27, 2024
70495b7
Add missing validation for meta deleted_frames
zhiltsov-max Sep 27, 2024
582640c
Handle case when there is not enough validation frames left for gener…
zhiltsov-max Sep 27, 2024
aec233b
Allow editing disabled validation frames in validation layout
zhiltsov-max Sep 27, 2024
077fffb
Improve validation, errors messages, add more descriptions in api
zhiltsov-max Sep 27, 2024
107fc8f
Add validation layout editing tests
zhiltsov-max Sep 27, 2024
c1eeee2
Update changelog
zhiltsov-max Sep 27, 2024
12a3fe0
Reduce code duplication on the same check for validation mode
zhiltsov-max Sep 27, 2024
128c78a
Fix some other comments
zhiltsov-max Sep 27, 2024
cafdeec
Update tests/python/rest_api/test_jobs.py
zhiltsov-max Sep 27, 2024
89bb815
Remove extra file
zhiltsov-max Sep 27, 2024
5b39661
Merge branch 'develop' into zm/validation-core
zhiltsov-max Sep 27, 2024
8451fda
Fix invalid handling of start, stop frames and frame step in tasks wi…
zhiltsov-max Sep 30, 2024
3d9fba2
Update tests
zhiltsov-max Sep 30, 2024
4b2b2dd
Fix field access
zhiltsov-max Sep 30, 2024
2fe8fba
Merge remote-tracking branch 'origin/zm/validation-core' into zm/vali…
zhiltsov-max Sep 30, 2024
8460d5d
Extract allocation table contents building function
zhiltsov-max Sep 30, 2024
a1bb881
Fix job removal
zhiltsov-max Sep 30, 2024
a4b8a97
Fix static chunk creation
zhiltsov-max Sep 30, 2024
e9e00b0
Add more test cases
zhiltsov-max Sep 30, 2024
20d3006
Remove unused variable
zhiltsov-max Sep 30, 2024
952e938
Merge branch 'zm/validation-core' into zm/validation-management-core
zhiltsov-max Sep 30, 2024
4c3c8b1
Fix type annotation
zhiltsov-max Sep 30, 2024
8cfe5bc
Update changelog
zhiltsov-max Sep 30, 2024
cc00426
Make frame set check more reliable
zhiltsov-max Sep 30, 2024
b5ab1be
Make segment type check more robust
zhiltsov-max Sep 30, 2024
23bfc2c
Remove extra db call
zhiltsov-max Sep 30, 2024
d4bc318
Improve error message
zhiltsov-max Sep 30, 2024
57f1d71
Add field description in the api
zhiltsov-max Sep 30, 2024
3bdc147
Enable automatic init for chunks_updated_date
zhiltsov-max Oct 1, 2024
c001e42
Add validation mode filter to tasks
zhiltsov-max Oct 1, 2024
0c4bd1b
Remove extra import
zhiltsov-max Oct 1, 2024
4b170fc
Add test for validation_mode filter
zhiltsov-max Oct 1, 2024
aa57b12
Add tests for chunk updates in jobs
zhiltsov-max Oct 1, 2024
cc7f0cd
Add new headers into schema
zhiltsov-max Oct 1, 2024
2cb54b7
Fix failing tests
zhiltsov-max Oct 1, 2024
01cd715
Merge remote-tracking branch 'origin/develop' into zm/validation-core
zhiltsov-max Oct 1, 2024
1e8433c
Merge test db with develop
zhiltsov-max Oct 1, 2024
89084d7
Update test assets
zhiltsov-max Oct 1, 2024
575c921
Migrate to m2m relationship for related files
zhiltsov-max Oct 1, 2024
4c8eb44
Update test db
zhiltsov-max Oct 1, 2024
565207d
Clean up imports
zhiltsov-max Oct 1, 2024
a08de18
Fix failing tests
zhiltsov-max Oct 1, 2024
079038a
Fix failing test
zhiltsov-max Oct 1, 2024
93dc8c7
Merge branch 'zm/validation-core' into zm/validation-management-core
zhiltsov-max Oct 2, 2024
2a674af
Updated client part
bsekachev Oct 2, 2024
cec49d6
Update test assets
zhiltsov-max Oct 2, 2024
8f4cc46
Fix test
zhiltsov-max Oct 2, 2024
fc2cdd7
Add handling for related images on honeypot changes
zhiltsov-max Oct 2, 2024
9d9b007
Add related field declaration in Image and Data models
zhiltsov-max Oct 2, 2024
d71b5df
Fixed warning
bsekachev Oct 2, 2024
28dc65f
Fix honeypot changes in jobs
zhiltsov-max Oct 2, 2024
7f68cce
Make honeypots reproducible
zhiltsov-max Oct 2, 2024
b25e5e8
Update tests
zhiltsov-max Oct 2, 2024
fd6c1cf
Improve type annotations for engine models
zhiltsov-max Oct 2, 2024
836012e
Fix random_seed for honeypots
zhiltsov-max Oct 2, 2024
07fd912
Merge remote-tracking branch 'origin/zm/validation-core' into zm/vali…
zhiltsov-max Oct 2, 2024
c662365
Fix honeypot frame selection
zhiltsov-max Oct 2, 2024
fedab4b
Fix invalid frame access during chunk rebuild on honeypot updates
zhiltsov-max Oct 2, 2024
3dbd769
Fix honeypot frame selection
zhiltsov-max Oct 2, 2024
47ff330
Update tests
zhiltsov-max Oct 2, 2024
2474b32
Merge branch 'develop' into zm/validation-management-core
zhiltsov-max Oct 2, 2024
6016025
DEBUG CI
zhiltsov-max Oct 3, 2024
eb790c9
Merge remote-tracking branch 'origin/zm/validation-management-core' i…
zhiltsov-max Oct 3, 2024
adcb367
Sync task permissions with develop
zhiltsov-max Oct 3, 2024
b91d9d6
Remove debug changes
zhiltsov-max Oct 3, 2024
876237d
Merge branch 'zm/validation-core' into zm/validation-management-core
zhiltsov-max Oct 3, 2024
371f73a
Fix chunk numbers in chunk rebuilding
zhiltsov-max Oct 3, 2024
5138b72
Fix chunk cache checks in the downloading optimization
zhiltsov-max Oct 3, 2024
98a9b79
Update data tests to use chunk size
zhiltsov-max Oct 3, 2024
2144c46
Merge remote-tracking branch 'origin/develop' into zm/validation-mana…
zhiltsov-max Oct 3, 2024
7bb5ae7
Update test db
zhiltsov-max Oct 3, 2024
0123148
Checks for frame_selection_method if honeypot_real_frames specified
zhiltsov-max Oct 3, 2024
5aed21e
Support single value in require_one_of_values
zhiltsov-max Oct 3, 2024
c541fbb
[Dependend] Reset chunks from cache if oudated (#8449)
bsekachev Oct 3, 2024
fd4f8c4
Align validation_params.frames with other similar cases
zhiltsov-max Oct 3, 2024
8ee2808
Support None values in require_one_of_values
zhiltsov-max Oct 3, 2024
84e82dd
Fix invalid frames used for honeypot updating
zhiltsov-max Oct 3, 2024
2c924cd
Add better api examples for updated endpoints
zhiltsov-max Oct 3, 2024
398c8f8
Fix check
zhiltsov-max Oct 3, 2024
c0cb1d6
Add kvrocks cleanup after class in rest api tests
zhiltsov-max Oct 3, 2024
d3152c8
Fix incorrect GT job saving on task creation
zhiltsov-max Oct 3, 2024
27b3370
Fix incorrect GT job saving on task creation
zhiltsov-max Oct 3, 2024
bfde94d
Add tests for gt job data access
zhiltsov-max Oct 4, 2024
e03cfe0
Update data tests to use chunk size
zhiltsov-max Oct 3, 2024
42a0781
Fix invalid chunks for gt jobs when ?number is used and frame step > 1
zhiltsov-max Oct 4, 2024
33d5e16
Fix invalid handling of start/step in gt jobs created with frames_per…
zhiltsov-max Oct 4, 2024
ce628d9
Fix invalid output of frames for specific gt frame requests
zhiltsov-max Oct 4, 2024
da1169d
Add tests for gt job with frame step and start frame, fix and update …
zhiltsov-max Oct 4, 2024
3479fcf
Update changelog
zhiltsov-max Oct 4, 2024
be98b3c
Update changelog
zhiltsov-max Oct 4, 2024
125d23e
Fix linter
zhiltsov-max Oct 4, 2024
b349055
Merge branch 'zm/fix-task-creation-with-gt-job' into zm/validation-ma…
zhiltsov-max Oct 4, 2024
e7ea0d2
Fix variable use
zhiltsov-max Oct 4, 2024
d424b5c
Fix unstable test
zhiltsov-max Oct 4, 2024
01a2207
Fix static chunk creation for gt segments
zhiltsov-max Oct 4, 2024
a8bda7d
Update permissions for validation layout endpoints
zhiltsov-max Oct 4, 2024
df6d3b9
Be more specific about distribution used in random reroll of honeypots
zhiltsov-max Oct 4, 2024
f6fa826
Added honeypots support on UI in review mode
bsekachev Oct 7, 2024
7e95849
Fixed condition
bsekachev Oct 7, 2024
6ad0c37
Merge branch 'develop' into zm/validation-management-core
bsekachev Oct 7, 2024
d9d50d8
Merged develop
bsekachev Oct 7, 2024
8d0f408
Fixed unresolved conflict
bsekachev Oct 7, 2024
5d90eb4
Fixed unresolved conflict
bsekachev Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions changelog.d/20240812_161617_mzhiltso_job_chunks.md

This file was deleted.

24 changes: 24 additions & 0 deletions changelog.d/20240819_210200_mzhiltso_validation_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Added

- New task mode: Honeypots (GT pool)
(<https://github.com/cvat-ai/cvat/pull/8348>)
- New task creation options for quality control: Honeypots (GT pool), GT job
(<https://github.com/cvat-ai/cvat/pull/8348>)
- New GT job frame selection method: `random_per_job`,
which guarantees each job will have GT overlap
(<https://github.com/cvat-ai/cvat/pull/8348>)
- \[Server API\] POST `/jobs/`: new frame selection parameters,
which accept percentages, instead of absolute values
(<https://github.com/cvat-ai/cvat/pull/8348>)
- \[Server API\] GET `/api/tasks/{id}/` got a new `validation_mode` field,
reflecting the current validation configuration (immutable)
(<https://github.com/cvat-ai/cvat/pull/8348>)
- \[Server API\] POST `/api/tasks/{id}/data` got a new `validation_params` field,
which allows to enable `GT` and `GT_POOL` validation for a task on its creation
(<https://github.com/cvat-ai/cvat/pull/8348>)

### Changed

- \[Server API\] POST `/jobs/` `.frames` field now expects relative frame numbers
instead of absolute (source data) ones
(<https://github.com/cvat-ai/cvat/pull/8348>)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Added

- \[Server API\] An option to change real frames for honeypot frames in tasks with honeypots
(<https://github.com/cvat-ai/cvat/pull/8471>)
- \[Server API\] New endpoints for validation configuration management in tasks and jobs
`/api/tasks/{id}/validation_layout`, `/api/jobs/{id}/validation_layout`
(<https://github.com/cvat-ai/cvat/pull/8471>)

### Changed
- \[Server API\] Now chunks in tasks can be changed.
There are new API elements to check chunk relevancy, if they are cached:
`/api/tasks/{id}/data/meta` got a new field `chunks_updated_date`,
`/api/tasks/{id}/data/?type=chunk` got 2 new headers: `X-Updated-Date`, `X-Checksum`
(<https://github.com/cvat-ai/cvat/pull/8471>)
48 changes: 31 additions & 17 deletions cvat-core/src/server-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
return new ServerError(message, 0);
}

function prepareData(details) {

Check warning on line 247 in cvat-core/src/server-proxy.ts

View workflow job for this annotation

GitHub Actions / Linter

Missing return type on function
const data = new FormData();
for (const [key, value] of Object.entries(details)) {
if (Array.isArray(value)) {
Expand Down Expand Up @@ -286,7 +286,7 @@
return requestId++;
}

async function get(url: string, requestConfig) {

Check warning on line 289 in cvat-core/src/server-proxy.ts

View workflow job for this annotation

GitHub Actions / Linter

Missing return type on function
return new Promise((resolve, reject) => {
const newRequestId = getRequestId();
requests[newRequestId] = { resolve, reject };
Expand Down Expand Up @@ -593,7 +593,7 @@
} catch (error) {
lastError = error;
if (attempt < adjustedMaxRetries) {
await new Promise((resolve) => setTimeout(resolve, adjustedCheckPeriod));
await new Promise((resolve) => { setTimeout(resolve, adjustedCheckPeriod); });
}
}
}
Expand All @@ -605,7 +605,7 @@
fetchAll: boolean,
}

export const sleep = (time: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, time));
export const sleep = (time: number): Promise<void> => new Promise((resolve) => { setTimeout(resolve, time); });

const defaultRequestConfig = {
fetchAll: false,
Expand Down Expand Up @@ -819,7 +819,7 @@
save_images: saveImages,
};
return new Promise<string | void>((resolve, reject) => {
async function request() {

Check warning on line 822 in cvat-core/src/server-proxy.ts

View workflow job for this annotation

GitHub Actions / Linter

Missing return type on function
Axios.post(baseURL, {}, {
params,
})
Expand Down Expand Up @@ -865,7 +865,8 @@
try {
if (isCloudStorage) {
const response = await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
});
return response.data.rq_id;
Expand All @@ -880,13 +881,15 @@
},
};
await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
headers: { 'Upload-Start': true },
});
await chunkUpload(file as File, uploadConfig);
const response = await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
headers: { 'Upload-Finish': true },
});
Expand All @@ -911,7 +914,7 @@
const url = `${backendAPI}/tasks/${id}/backup/export`;

return new Promise<string | void>((resolve, reject) => {
async function request() {

Check warning on line 917 in cvat-core/src/server-proxy.ts

View workflow job for this annotation

GitHub Actions / Linter

Missing return type on function
try {
const response = await Axios.post(url, {}, {
params,
Expand Down Expand Up @@ -945,7 +948,8 @@
if (isCloudStorage) {
params.filename = file as string;
response = await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
});
return response.data.rq_id;
Expand All @@ -957,13 +961,15 @@
totalSize: (file as File).size,
};
await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
headers: { 'Upload-Start': true },
});
const { filename } = await chunkUpload(file as File, uploadConfig);
response = await Axios.post(url,
new FormData(), {
new FormData(),
{
params: { ...params, filename },
headers: { 'Upload-Finish': true },
});
Expand All @@ -990,7 +996,7 @@
const url = `${backendAPI}/projects/${id}/backup/export`;

return new Promise<string | void>((resolve, reject) => {
async function request() {

Check warning on line 999 in cvat-core/src/server-proxy.ts

View workflow job for this annotation

GitHub Actions / Linter

Missing return type on function
try {
const response = await Axios.post(url, {}, {
params,
Expand Down Expand Up @@ -1024,7 +1030,8 @@
if (isCloudStorage) {
params.filename = file;
response = await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
});
return response.data.rq_id;
Expand All @@ -1036,13 +1043,15 @@
totalSize: (file as File).size,
};
await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
headers: { 'Upload-Start': true },
});
const { filename } = await chunkUpload(file as File, uploadConfig);
response = await Axios.post(url,
new FormData(), {
new FormData(),
{
params: { ...params, filename },
headers: { 'Upload-Finish': true },
});
Expand Down Expand Up @@ -1088,7 +1097,7 @@
value.forEach((element, idx) => {
taskData.append(`${key}[${idx}]`, element);
});
} else {
} else if (typeof value !== 'object') {
taskData.set(key, value);
}
}
Expand All @@ -1115,7 +1124,7 @@
message: 'CVAT is uploading task data to the server',
}));

async function bulkUpload(taskId, files) {

Check warning on line 1127 in cvat-core/src/server-proxy.ts

View workflow job for this annotation

GitHub Actions / Linter

Missing return type on function
const fileBulks = files.reduce((fileGroups, file) => {
const lastBulk = fileGroups[fileGroups.length - 1];
if (chunkSize - lastBulk.size >= file.size) {
Expand Down Expand Up @@ -1153,7 +1162,8 @@
let rqID = null;
try {
await Axios.post(`${backendAPI}/tasks/${response.data.id}/data`,
taskData, {
{},
{
...params,
headers: { 'Upload-Start': true },
});
Expand All @@ -1178,7 +1188,8 @@
await bulkUpload(response.data.id, bulkFiles);
}
const dataResponse = await Axios.post(`${backendAPI}/tasks/${response.data.id}/data`,
taskData, {
taskDataSpec,
{
...params,
headers: { 'Upload-Finish': true },
});
Expand Down Expand Up @@ -1568,7 +1579,8 @@
try {
if (isCloudStorage) {
const response = await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
});
return response.data.rq_id;
Expand All @@ -1579,13 +1591,15 @@
endpoint: `${origin}${backendAPI}/${session}s/${id}/annotations/`,
};
await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
headers: { 'Upload-Start': true },
});
await chunkUpload(file as File, uploadConfig);
const response = await Axios.post(url,
new FormData(), {
new FormData(),
{
params,
headers: { 'Upload-Finish': true },
});
Expand Down
3 changes: 1 addition & 2 deletions cvat-core/src/session-implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ export function implementTask(Task: typeof TaskClass): typeof TaskClass {
if (typeof this.id !== 'undefined') {
// If the task has been already created, we update it
const taskData = {
...fields,
...this._updateTrigger.getUpdated(this, {
bugTracker: 'bug_tracker',
projectId: 'project_id',
Expand Down Expand Up @@ -680,7 +679,6 @@ export function implementTask(Task: typeof TaskClass): typeof TaskClass {
}

const taskSpec: any = {
...fields,
name: this.name,
labels: this.labels.map((el) => el.toJSON()),
};
Expand Down Expand Up @@ -723,6 +721,7 @@ export function implementTask(Task: typeof TaskClass): typeof TaskClass {
...(typeof this.dataChunkSize !== 'undefined' ? { chunk_size: this.dataChunkSize } : {}),
...(typeof this.copyData !== 'undefined' ? { copy_data: this.copyData } : {}),
...(typeof this.cloudStorageId !== 'undefined' ? { cloud_storage_id: this.cloudStorageId } : {}),
...(fields.validation_params ? { validation_params: fields.validation_params } : {}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

validation_params Are Not Persisted in the Backend

The validation_params are constructed in the UI actions and spread into the session implementation. However, there are no instances of validation_params found in the backend models or API handlers. This suggests that these parameters might not be persisted, potentially leading to inconsistencies in the validation management system.

  • Ensure that validation_params are properly saved and retrieved from the database.
  • Verify the relevant API endpoints handle validation_params correctly to maintain data integrity.
🔗 Analysis chain

Verify integration with validation management system

This change appears to be part of a larger enhancement to the validation management system. To ensure its effectiveness:

  1. Verify that the validation_params are correctly processed and utilized in the validation management core.
  2. Check if there are any UI components that need to be updated to allow users to set these validation parameters.
  3. Ensure that the validation parameters are correctly persisted in the database and retrieved when needed.

To help verify the integration, you can run the following script to check for usage of validation_params across the codebase:


Further investigate usage of validation_params in UI actions

To ensure that validation_params are properly integrated within the UI actions, please run the following script to gather additional context from tasks-actions.ts:


Verify persistence and retrieval of validation_params in the backend

To ensure that validation_params are correctly persisted and retrieved, please run the following script to identify their usage in backend models and API handlers:


Search for validation_params Throughout cvat-core/src/

To locate all instances of validation_params within the backend, please run the following script:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for usage of validation_params
rg "validation_params" --type ts --type js

Length of output: 258


Script:

# 
#!/bin/bash
# Get lines around the usage of validation_params in tasks-actions.ts
rg "validation_params" cvat-ui/src/actions/tasks-actions.ts -A 5 -B 5

Length of output: 560


Script:

# 
#!/bin/bash
# Search for validation_params in backend models and API handlers
rg "validation_params" cvat-core/src/models/ cvat-core/src/api/

Length of output: 184


Script:

# 
#!/bin/bash
# Search for validation_params in the entire cvat-core/src/ directory
rg "validation_params" cvat-core/src/ --type ts --type js

Length of output: 199

};

const { taskID, rqID } = await serverProxy.tasks.create(
Expand Down
9 changes: 7 additions & 2 deletions cvat-core/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -737,9 +737,9 @@ export class Task extends Session {
public readonly cloudStorageId: number;
public readonly sortingMethod: string;

public readonly validationMethod: string;
public readonly validationMode: string | null;
public readonly validationFramesPercent: number;
public readonly validationFramesPerJob: number;
public readonly validationFramesPerJobPercent: number;
public readonly frameSelectionMethod: string;

constructor(initialData: Readonly<Omit<SerializedTask, 'labels' | 'jobs'> & {
Expand Down Expand Up @@ -786,6 +786,8 @@ export class Task extends Session {
cloud_storage_id: undefined,
sorting_method: undefined,
files: undefined,

validation_mode: null,
};

const updateTrigger = new FieldUpdateTrigger();
Expand Down Expand Up @@ -1113,6 +1115,9 @@ export class Task extends Session {
progress: {
get: () => data.progress,
},
validationMode: {
get: () => data.validation_mode,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider adding missing getters and setters for new properties.

The getter for validationMode is correctly implemented. However, for consistency and completeness:

  1. Add getters for validationFramesPercent and validationFramesPerJobPercent.
  2. Implement setters for all three new properties (validationMode, validationFramesPercent, and validationFramesPerJobPercent).

Here's a suggested implementation:

validationMode: {
    get: () => data.validation_mode,
    set: (mode) => {
        if (mode !== null && typeof mode !== 'string') {
            throw new ArgumentError('Value must be a string or null');
        }
        updateTrigger.update('validationMode');
        data.validation_mode = mode;
    },
},
validationFramesPercent: {
    get: () => data.validation_frames_percent,
    set: (percent) => {
        if (typeof percent !== 'number' || percent < 0 || percent > 100) {
            throw new ArgumentError('Value must be a number between 0 and 100');
        }
        updateTrigger.update('validationFramesPercent');
        data.validation_frames_percent = percent;
    },
},
validationFramesPerJobPercent: {
    get: () => data.validation_frames_per_job_percent,
    set: (percent) => {
        if (typeof percent !== 'number' || percent < 0 || percent > 100) {
            throw new ArgumentError('Value must be a number between 0 and 100');
        }
        updateTrigger.update('validationFramesPerJobPercent');
        data.validation_frames_per_job_percent = percent;
    },
},

This implementation includes type checking and value range validation for the setters, ensuring data integrity.

_internalData: {
get: () => data,
},
Expand Down
6 changes: 4 additions & 2 deletions cvat-sdk/cvat_sdk/core/proxies/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ def get_frames_info(self) -> List[models.IFrameMeta]:
return self.get_meta().frames

def remove_frames_by_ids(self, ids: Sequence[int]) -> None:
self._client.api_client.tasks_api.jobs_partial_update_data_meta(
self.api.partial_update_data_meta(
self.id,
patched_data_meta_write_request=models.PatchedDataMetaWriteRequest(deleted_frames=ids),
patched_job_data_meta_write_request=models.PatchedJobDataMetaWriteRequest(
deleted_frames=ids
),
)

def get_issues(self) -> List[Issue]:
Expand Down
1 change: 1 addition & 0 deletions cvat-sdk/cvat_sdk/core/proxies/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def upload_data(
"filename_pattern",
"cloud_storage_id",
"server_files_exclude",
"validation_params",
],
)
)
Expand Down
25 changes: 12 additions & 13 deletions cvat-ui/src/actions/tasks-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { filterNull } from 'utils/filter-null';
import { ThunkDispatch, ThunkAction } from 'utils/redux';

import { ValidationMethod } from 'components/create-task-page/quality-configuration-form';
import { ValidationMode } from 'components/create-task-page/quality-configuration-form';
import { getInferenceStatusAsync } from './models-actions';
import { updateRequestProgress } from './requests-actions';

Expand Down Expand Up @@ -257,19 +257,18 @@ ThunkAction {

let extras = {};

if (data.quality.validationMethod === ValidationMethod.GT) {
if (data.quality.validationMode !== ValidationMode.NONE) {
extras = {
validation_method: ValidationMethod.GT,
validation_frames_percent: data.quality.validationFramesPercent,
frame_selection_method: data.quality.frameSelectionMethod,
};
}

if (data.quality.validationMethod === ValidationMethod.HONEYPOTS) {
extras = {
validation_method: ValidationMethod.HONEYPOTS,
validation_frames_percent: data.quality.validationFramesPercent,
validation_frames_per_job: data.quality.validationFramesPerJob,
validation_params: {
mode: data.quality.validationMode,
frame_selection_method: data.quality.frameSelectionMethod,
frame_share: data.quality.validationFramesPercent ? (
data.quality.validationFramesPercent / 100
) : data.quality.validationFramesPercent,
frames_per_job_share: data.quality.validationFramesPerJobPercent ? (
data.quality.validationFramesPerJobPercent / 100
) : data.quality.validationFramesPerJobPercent,
zhiltsov-max marked this conversation as resolved.
Show resolved Hide resolved
},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ interface Props {
frameNumber: number;
frameFilename: string;
frameDeleted: boolean;
deleteFrameAvailable: boolean;
deleteFrameShortcut: string;
focusFrameInputShortcut: string;
inputFrameRef: React.RefObject<HTMLInputElement>;
Expand Down Expand Up @@ -77,7 +76,6 @@ function PlayerNavigation(props: Props): JSX.Element {
ranges,
keyMap,
workspace,
deleteFrameAvailable,
onSliderChange,
onInputChange,
onURLIconClick,
Expand Down Expand Up @@ -192,9 +190,7 @@ function PlayerNavigation(props: Props): JSX.Element {
<CVATTooltip title='Create frame URL'>
<LinkOutlined className='cvat-player-frame-url-icon' onClick={onURLIconClick} />
</CVATTooltip>
{
deleteFrameAvailable && deleteFrameIcon
}
{ deleteFrameIcon }
</Col>
</Row>
</Col>
Expand Down
3 changes: 0 additions & 3 deletions cvat-ui/src/components/annotation-page/top-bar/top-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ interface Props {
focusFrameInputShortcut: string;
activeControl: ActiveControl;
toolsBlockerState: ToolsBlockerState;
deleteFrameAvailable: boolean;
annotationFilters: object[];
initialOpenGuide: boolean;
keyMap: KeyMap;
Expand Down Expand Up @@ -101,7 +100,6 @@ export default function AnnotationTopBarComponent(props: Props): JSX.Element {
toolsBlockerState,
annotationFilters,
initialOpenGuide,
deleteFrameAvailable,
navigationType,
jobInstance,
keyMap,
Expand Down Expand Up @@ -176,7 +174,6 @@ export default function AnnotationTopBarComponent(props: Props): JSX.Element {
onDeleteFrame={onDeleteFrame}
onRestoreFrame={onRestoreFrame}
switchNavigationBlocked={switchNavigationBlocked}
deleteFrameAvailable={deleteFrameAvailable}
/>
), 10]);

Expand Down
Loading
Loading