-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a45bc7
commit 0572fa1
Showing
28 changed files
with
1,857 additions
and
123 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
changelog.d/20240930_171153_mzhiltso_validation_management_core.md
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,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>) |
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
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,44 @@ | ||
// Copyright (C) 2024 CVAT.ai Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
import { SerializedValidationLayout } from 'server-response-types'; | ||
import PluginRegistry from './plugins'; | ||
|
||
export default class ValidationLayout { | ||
#honeypotFrames: number[]; | ||
#honeypotRealFrames: number[]; | ||
|
||
public constructor(data: Required<SerializedValidationLayout>) { | ||
this.#honeypotFrames = [...data.honeypot_frames]; | ||
this.#honeypotRealFrames = [...data.honeypot_real_frames]; | ||
} | ||
|
||
public get honeypotFrames() { | ||
return [...this.#honeypotFrames]; | ||
} | ||
|
||
public get honeypotRealFrames() { | ||
return [...this.#honeypotRealFrames]; | ||
} | ||
|
||
async getRealFrame(frame: number): Promise<number | null> { | ||
const result = await PluginRegistry.apiWrapper.call(this, ValidationLayout.prototype.getRealFrame, frame); | ||
return result; | ||
} | ||
} | ||
|
||
Object.defineProperties(ValidationLayout.prototype.getRealFrame, { | ||
implementation: { | ||
writable: false, | ||
enumerable: false, | ||
value: function implementation(this: ValidationLayout, frame: number): number | null { | ||
const index = this.honeypotFrames.indexOf(frame); | ||
if (index !== -1) { | ||
return this.honeypotRealFrames[index]; | ||
} | ||
|
||
return null; | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.