-
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
Validation management core #8471
Changes from 250 commits
65b4591
c5fa228
bf09a38
abb214f
92a19f4
441d0e7
1d29c2f
d81e1da
0963f94
0d78e63
b9ca46c
f53948d
3ce0864
ef0dce9
e69f2b7
68cb59b
1a9a813
3caab1b
de1bf68
1c32114
ab3066a
d3b58bc
bb48ae6
81e1692
f84d93f
be7ebb3
e4db8ad
b1c54f9
5312b00
3c117fe
98eff81
316ec78
ebed825
92f6083
2b6e987
5986f63
26ffb22
274237c
1c36f81
acc0697
876164e
915abdf
c42f20b
30dc7a7
f67a1a2
d72fe85
d5bfb88
c5a1197
a5cf3b7
069f48c
cfdde3f
843b957
feb92cd
2424f2b
fe60bdf
6ddb6bf
4fa7b97
32f1be2
4ff0767
39e8f65
1b08e22
0e95b40
21135b7
f775dcf
c87de20
b311f1e
f9f5001
79bb1f7
55a8424
add5ae6
643d998
27f733a
17cc539
df90b33
6ccb7db
1fb68bc
92d0c7a
67c1650
62bfb45
03f58ed
cbd75cd
7f2e42e
6cc0012
5322e82
057bbb5
b9f6f8b
63c15ec
5a7a419
c297dac
0313ffa
814a5db
3cdc4dc
716042e
19279c7
edaa8d0
6deaf8e
e6c4cdb
b8a25cf
28a4a61
bc5ed39
08ddd28
1d969bd
e2cba8c
d135475
a1638c9
fc89c01
f8878d0
c6e65f6
85a6244
2679ff4
39c8572
169b22c
ee822ac
9f19081
e38f2f9
5986866
5bba804
ce5cf05
b16c0fa
6d80d66
9bdfbaf
2415260
be0f543
6e9194e
118828a
7308b76
e447473
7aaccbd
4667650
170e73b
dd39291
3eea60d
cc5637a
7535d09
8054be9
4f5d642
1910dcd
7be49e2
8f784d9
0de8f0e
26ecf67
07a997f
ace52d4
c37a18f
81e2cf1
359f2d4
c475ae0
70495b7
582640c
aec233b
077fffb
107fc8f
c1eeee2
12a3fe0
128c78a
cafdeec
89bb815
5b39661
8451fda
3d9fba2
4b2b2dd
2fe8fba
8460d5d
a1bb881
a4b8a97
e9e00b0
20d3006
952e938
4c3c8b1
8cfe5bc
cc00426
b5ab1be
23bfc2c
d4bc318
57f1d71
3bdc147
c001e42
0c4bd1b
4b170fc
aa57b12
cc7f0cd
2cb54b7
01cd715
1e8433c
89084d7
575c921
4c8eb44
565207d
a08de18
079038a
93dc8c7
2a674af
cec49d6
8f4cc46
fc2cdd7
9d9b007
d71b5df
28dc65f
7f68cce
b25e5e8
fd6c1cf
836012e
07fd912
c662365
fedab4b
3dbd769
47ff330
2474b32
6016025
eb790c9
adcb367
b91d9d6
876237d
371f73a
5138b72
98a9b79
2144c46
7bb5ae7
0123148
5aed21e
c541fbb
fd4f8c4
8ee2808
84e82dd
2c924cd
398c8f8
c0cb1d6
d3152c8
27b3370
bfde94d
e03cfe0
42a0781
33d5e16
ce628d9
da1169d
3479fcf
be98b3c
125d23e
b349055
e7ea0d2
d424b5c
01a2207
a8bda7d
df6d3b9
f6fa826
7e95849
6ad0c37
d9d50d8
8d0f408
5d90eb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
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>) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'> & { | ||
|
@@ -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(); | ||
|
@@ -1113,6 +1115,9 @@ export class Task extends Session { | |
progress: { | ||
get: () => data.progress, | ||
}, | ||
validationMode: { | ||
get: () => data.validation_mode, | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
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, | ||
}, | ||
|
There was a problem hiding this comment.
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 BackendThe
validation_params
are constructed in the UI actions and spread into the session implementation. However, there are no instances ofvalidation_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.validation_params
are properly saved and retrieved from the database.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:
validation_params
are correctly processed and utilized in the validation management core.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 actionsTo ensure that
validation_params
are properly integrated within the UI actions, please run the following script to gather additional context fromtasks-actions.ts
:Verify persistence and retrieval of
validation_params
in the backendTo 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
Throughoutcvat-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:
Length of output: 258
Script:
Length of output: 560
Script:
Length of output: 184
Script:
Length of output: 199