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

[CVAT] Points to boxes task #1560

Merged
merged 18 commits into from
Feb 20, 2024
Merged

Conversation

zhiltsov-max
Copy link
Collaborator

@zhiltsov-max zhiltsov-max commented Feb 2, 2024

Description

Summary of changes

  • Added task creation, export, and validation for IMAGE_BOXES_FROM_POINTS job type in Exchange / Recording oracles for CVAT
  • Refactored cloud storage API in CVAT oracles, task creation, export, and validation

How test the changes

  • Currently, only testing with local deployment is available. Job launcher doesn't support this yet.

Related issues

Keywords for linking issues

Copy link

vercel bot commented Feb 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
job-launcher-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 12, 2024 11:43am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
escrow-dashboard ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2024 11:43am
faucet-server ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2024 11:43am
job-launcher-client ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2024 11:43am
reputation-oracle-server ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2024 11:43am

@zhiltsov-max zhiltsov-max marked this pull request as ready for review February 9, 2024 12:45
@Dzeranov Dzeranov merged commit 52e3471 into cvat-milestone-2 Feb 20, 2024
16 checks passed
Dzeranov added a commit that referenced this pull request Mar 28, 2024
* Fix job event handling when no assignments exist

* Implement boxes from points task creation

* Refactor cloud storage api

* Implement job downloading

* Estimate max bbox

* Little refactoring

* Copy some shared code from excor to recor

* Refactor task creation and export

* Implement boxes from points validation

* Integrate SDK updates

* Fix escrow access

* [Exchange/Recoring oracles] Add GCS support

* Remove local dev mocks

* Remove some extra changes

* Update tests

* Update some tests

* Remove extra launcher change

* Refactor code

* Add google-cloud-storage dependency

* Fix exception classes

* Set env variables in docker-compose.test.yml

* [CVAT] Points to boxes task (#1560)

* Fix job event handling when no assignments exist

* Implement boxes from points task creation

* Refactor cloud storage api

* Implement job downloading

* Estimate max bbox

* Little refactoring

* Copy some shared code from excor to recor

* Refactor task creation and export

* Implement boxes from points validation

* Integrate SDK updates

* Fix escrow access

* Remove local dev mocks

* Remove some extra changes

* Update tests

* Update some tests

* Remove extra launcher change

* Use virtual hosted bucket style

* Fix creating CS in CVAT

* Fix tests

* Add basic implementation for skeletons from boxes

* Refactor and fix some errors

* Implement job uploading

* Implement downloading

* Fix extra gt boxes in merged results from excor

* Implement skeleton matching

* Fix labels in merged annotations

* Update project events handling in excor

* Improve oks sigma comment

* Remove local testing assets

* Fix label mapping

* Add extra skeleton validations in manifest

* Update .env template

* Update several comments

* Fix failing tests

* Update enum name

* Add more annotation validations for skeletons

* Extend input annotations validation

* Fix quality computation, refactor

* Unify assignment accuracy checks between different job types

* Refactor GT downloading for validation

* Add gcs support - fixes (#1)

* Update code formatting

* Update poetry lock

* Refactor

* Use dict for gcs file contents

* Update class name

* Add backward compatibility for data bucket env var

* Remove extra changes

* Remove extra import

* Fix enum name

* Update bucket access info parsing

* Fix error type in cloud provider parsing

* Update tests

* Add job annotation mode param into assignment links

* Add CD trigger for experimental cvat oracles

* Update code formatting

* Fix test

* Format code

* Fix bucket uses

* Fix result sending

* Remove extra changes

* Fix extra code

* Remove unused code

* Align enum naming convention

* Use relative paths in bucket in task creation

* Improve error messages

* Improve skeleton and bbox validation

* Fix escrow manifest downloading

* Update tests

* Fix tests

* Implement general image bans

* Fix import

* Make default gt ban threshold more strict

* Fix comparison for absent points

* Fix comparison for omitted points in jobs

* Finish escrows with too many unverifiable assignments

* Check if an increased healthcheck interval will fix unhealthy container (#1700)

* Fix validations for boxes from points task creation

* Clean code

* disable roi estimation for unreliable cases

* Fix manifest parsing

* Remove m0 launcher stubs

* Remove m0 rep or stubs

* Make max assignment time optional in manifest

* Make label type fully optional in manifest

* Fix test

* Enable and fix a disabled m1 task creation test

* Fix RecOr tests

---------

Co-authored-by: maya <maria@cvat.ai>
Co-authored-by: Ivan <ivan@hmt.ai>
Co-authored-by: Dzeranov <sergey.dzeranov@gmail.com>
Dzeranov added a commit that referenced this pull request Mar 28, 2024
* Fix job event handling when no assignments exist

* Implement boxes from points task creation

* Refactor cloud storage api

* Implement job downloading

* Estimate max bbox

* Little refactoring

* Copy some shared code from excor to recor

* Refactor task creation and export

* Implement boxes from points validation

* Integrate SDK updates

* Fix escrow access

* [Exchange/Recoring oracles] Add GCS support

* Remove local dev mocks

* Remove some extra changes

* Update tests

* Update some tests

* Remove extra launcher change

* Refactor code

* Add google-cloud-storage dependency

* Fix exception classes

* Set env variables in docker-compose.test.yml

* [CVAT] Points to boxes task (#1560)

* Fix job event handling when no assignments exist

* Implement boxes from points task creation

* Refactor cloud storage api

* Implement job downloading

* Estimate max bbox

* Little refactoring

* Copy some shared code from excor to recor

* Refactor task creation and export

* Implement boxes from points validation

* Integrate SDK updates

* Fix escrow access

* Remove local dev mocks

* Remove some extra changes

* Update tests

* Update some tests

* Remove extra launcher change

* Use virtual hosted bucket style

* Fix creating CS in CVAT

* Fix tests

* Add basic implementation for skeletons from boxes

* Refactor and fix some errors

* Implement job uploading

* Implement downloading

* Fix extra gt boxes in merged results from excor

* Implement skeleton matching

* Fix labels in merged annotations

* Update project events handling in excor

* Improve oks sigma comment

* Remove local testing assets

* Fix label mapping

* Add extra skeleton validations in manifest

* Update .env template

* Update several comments

* Fix failing tests

* Update enum name

* Add more annotation validations for skeletons

* Extend input annotations validation

* Fix quality computation, refactor

* Unify assignment accuracy checks between different job types

* Refactor GT downloading for validation

* Add gcs support - fixes (#1)

* Update code formatting

* Update poetry lock

* Refactor

* Use dict for gcs file contents

* Update class name

* Add backward compatibility for data bucket env var

* Remove extra changes

* Remove extra import

* Fix enum name

* Update bucket access info parsing

* Fix error type in cloud provider parsing

* Update tests

* Add job annotation mode param into assignment links

* Add CD trigger for experimental cvat oracles

* Update code formatting

* Fix test

* Format code

* Fix bucket uses

* Fix result sending

* Remove extra changes

* Fix extra code

* Remove unused code

* Align enum naming convention

* Use relative paths in bucket in task creation

* Improve error messages

* Improve skeleton and bbox validation

* Fix escrow manifest downloading

* Update tests

* Fix tests

* Implement general image bans

* Fix import

* Make default gt ban threshold more strict

* Fix comparison for absent points

* Fix comparison for omitted points in jobs

* Finish escrows with too many unverifiable assignments

* Check if an increased healthcheck interval will fix unhealthy container (#1700)

* Fix validations for boxes from points task creation

* Clean code

* disable roi estimation for unreliable cases

* Fix manifest parsing

* Remove m0 launcher stubs

* Remove m0 rep or stubs

* Make max assignment time optional in manifest

* Make label type fully optional in manifest

* Fix test

* Enable and fix a disabled m1 task creation test

* Don't fail on too many unused GT in boxes from points

* Make joints optional in skeletons from boxes manifests

* Review gt exclusion errors

* Fix RecOr tests

---------

Co-authored-by: maya <maria@cvat.ai>
Co-authored-by: Ivan <ivan@hmt.ai>
Co-authored-by: Dzeranov <sergey.dzeranov@gmail.com>
@leric7 leric7 deleted the zm/points-to-boxes-task branch June 3, 2024 12:25
Dzeranov added a commit that referenced this pull request Oct 8, 2024
* Fix job event handling when no assignments exist

* Implement boxes from points task creation

* Refactor cloud storage api

* Implement job downloading

* Estimate max bbox

* Little refactoring

* Copy some shared code from excor to recor

* Refactor task creation and export

* Implement boxes from points validation

* Integrate SDK updates

* Fix escrow access

* [Exchange/Recoring oracles] Add GCS support

* Remove local dev mocks

* Remove some extra changes

* Update tests

* Update some tests

* Remove extra launcher change

* Refactor code

* Add google-cloud-storage dependency

* Fix exception classes

* Set env variables in docker-compose.test.yml

* [CVAT] Points to boxes task (#1560)

* Fix job event handling when no assignments exist

* Implement boxes from points task creation

* Refactor cloud storage api

* Implement job downloading

* Estimate max bbox

* Little refactoring

* Copy some shared code from excor to recor

* Refactor task creation and export

* Implement boxes from points validation

* Integrate SDK updates

* Fix escrow access

* Remove local dev mocks

* Remove some extra changes

* Update tests

* Update some tests

* Remove extra launcher change

* Use virtual hosted bucket style

* Fix creating CS in CVAT

* Fix tests

* Add basic implementation for skeletons from boxes

* Refactor and fix some errors

* Implement job uploading

* Implement downloading

* Fix extra gt boxes in merged results from excor

* Implement skeleton matching

* Fix labels in merged annotations

* Update project events handling in excor

* Improve oks sigma comment

* Remove local testing assets

* Fix label mapping

* Add extra skeleton validations in manifest

* Update .env template

* Update several comments

* Fix failing tests

* Update enum name

* Add more annotation validations for skeletons

* Extend input annotations validation

* Fix quality computation, refactor

* Unify assignment accuracy checks between different job types

* Refactor GT downloading for validation

* Add gcs support - fixes (#1)

* Update code formatting

* Update poetry lock

* Refactor

* Use dict for gcs file contents

* Update class name

* Add backward compatibility for data bucket env var

* Remove extra changes

* Remove extra import

* Fix enum name

* Update bucket access info parsing

* Fix error type in cloud provider parsing

* Update tests

* Add job annotation mode param into assignment links

* Add CD trigger for experimental cvat oracles

* Update code formatting

* Fix test

* Format code

* Fix bucket uses

* Fix result sending

* Remove extra changes

* Fix extra code

* Remove unused code

* Align enum naming convention

* Update oracle-webhook endpoints

* Update webhooks for m2

* Update imports

* Use relative paths in bucket in task creation

* Improve error messages

* Improve skeleton and bbox validation

* Fix escrow manifest downloading

* Update tests

* Fix tests

* Implement general image bans

* Fix import

* Make default gt ban threshold more strict

* Fix comparison for absent points

* Fix comparison for omitted points in jobs

* Finish escrows with too many unverifiable assignments

* Check if an increased healthcheck interval will fix unhealthy container (#1700)

* Fix validations for boxes from points task creation

* Clean code

* disable roi estimation for unreliable cases

* Fix manifest parsing

* Remove m0 launcher stubs

* Remove m0 rep or stubs

* Make max assignment time optional in manifest

* Make label type fully optional in manifest

* Fix test

* Enable and fix a disabled m1 task creation test

* Fix RecOr tests

* Update poetry lock

* Rename rejected_jobs to assignments

* Update imports

* Fix dict traversal

* [Dependent][CVAT-M2] Oracles M2 API - endpoints (#1649)

* Upgrade deps, upgrade pydantic to v2 and fastapi to 0.109

* Migrate code to pydantic v2

* Add filtering and pagination utilities

* Add draft implementation for updated excor endpoints, refactor enum names

* Fixes and refactoring

* Update endpoint response fields and filters

* Implement response field selection

* Add new endpoints

* Support JWT auth

* Update .env template

* Move type definition

* Refactor pagination

* Add page size env var

* Add jwt lib project dependency

* Fix authorization header integration with swagger

* Adopt pagination changes

* Fix assignment status filter

* Add job status field and filter

* Add redis and rate limiting for stats

* Update recording update deps, align versions

* Remove job_title from /job

* Update poetry lock

* Refactor some code

* Add resign endpoint

* Take updated_at from created_at for active assignments

* Update register endpoint api

* Add qualifications stubs in API

* Remove deprecated max_time from manifest

* Add qualifications into job responses

* Update code formatting

* Update deprecated method .dict() uses

* Update deprecated parse_obj calls on pydantic models

* Update comment

* Remove human app signature header from /register

* Fix throttling implementation

* Add new filters in API

* Update fastapi to 0.111.1

* Update email and method name in /register

* Add missing chain_id filter in list_assignments

* Rename amount to total in stats

* Don't allow updating user

* [Exchange Oracle] Update lock file

* [Exchange Oracle] Mark @field_validator as a classmethod decorator

* [Exchange Oracle] Fix Ruff violations

* [Exchange Oracle] Remove deprecated param

* [Recording Oracle] Fix ruff violations

* [Recording Oracle] Update poetry.lock

* Add redis auth

* Refactor some code, allow empty wallet_address in JWT if role is human app

* Fix CI checks

* Update dev env configs

* [Exchange oracle] return 401 instead of 403 when there is no authorization header

* [Exchange oracle] list assignments: make filter params optional && resign assignment: make assignment_id a request body param

* [Exchange oracle] Update api tests

* [Exchange oracle] Update integraton/services/test_exchange.py

* Use renamed enum members

* t

* Update poetry.lock

* t

* Small fixes

* Import StrEnum from strenum directly

* [Exchange oracle] Fix pagination

* [Exchange oracle] GET /job fields param: support json array

* [Exchange oracle] more tests

* [Exchange oracle] Fix sorting

* [Exchange oracle] RecordingOracleEvent_SubmissionRejected::RejectedAssignmentInfo::task_id -> assignment_id

* [Recording oracle] RecordingOracleEvent_SubmissionRejected::RejectedAssignmentInfo::task_id -> assignment_id

* Remove todo

* [Exchange oracle] Fix missed updated_at in GET /job response

* [Exchange oracle] Add description and examples for JobsFilter::fields

* Update packages/examples/cvat/exchange-oracle/src/endpoints/filtering.py

* Remove extra file after merge

* Improve comment

* Refactor some code

* Improve comment

* Improve comment

* Remove outdated comment

* Fix formatting

* Apply comments

* Fix invalid updated_after filtering for assignments

* Fix invalid assignment status filter and refactor job status filter

* Make docker images lighter for oracles

* Refactor some code

* Extend list assignments test

* Fix linter errors

* Touch parents updated_at when updating a child && update tests

* Update packages/examples/cvat/recording-oracle/src/handlers/process_intermediate_results.py

* Update packages/examples/cvat/exchange-oracle/src/crons/cvat/state_trackers.py

* Fix ordering value register in API

* Allow ordering in any register

* Unify parent update mechanism on ORM models

* Unify touch in cvat service

* Remove touch methods from models

* Update tests

* Add dummy joints

* Remove .vscode dir

* Update cryptography to 43.0.1

GHSA-h4gh-qq45-vh27

* Replace python-jose with pyjwt

GHSA-cjwg-qfpm-7377
GHSA-6c5p-j8vq-pqhj

---------

Co-authored-by: maya <maria@cvat.ai>
Co-authored-by: Ivan <ivan@hmt.ai>
Co-authored-by: Dzeranov <sergey.dzeranov@gmail.com>
Co-authored-by: Arseny Boykov <36469655+Bobronium@users.noreply.github.com>
Co-authored-by: Arseny Boykov <appkiller16@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants