-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Release v2.11.0 #7510
Merged
Merged
Release v2.11.0 #7510
Conversation
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
Update develop after v2.10.3
Co-authored-by: Boris Sekachev <[email protected]>
<!-- Raise an issue to propose your change (https://github.com/opencv/cvat/issues). It helps to avoid duplication of efforts from multiple independent contributors. Discuss your ideas with maintainers to be sure that changes will be approved and merged. Read the [Contribution guide](https://opencv.github.io/cvat/docs/contributing/). --> <!-- Provide a general summary of your changes in the Title above --> ### Motivation and context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. Describe your changes in detail, add screenshots. --> This is a preparatory PR before I add more events. ### How has this been tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> ### Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. If an item isn't applicable for some reason, then ~~explicitly strikethrough~~ the whole line. If you don't do that, GitHub will show incorrect progress for the pull request. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I submit my changes into the `develop` branch - ~~[ ] I have created a changelog fragment~~ <!-- see top comment in CHANGELOG.md --> - ~~[ ] I have updated the documentation accordingly~~ - ~~[ ] I have added tests to cover my changes~~ - ~~[ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))~~ - ~~[ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))~~ ### License - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern.
By default failed rq jobs are kept for 1 year. It is too long and leads to keeping a lot of unnecessary results in Redis.
…ansaction (#7460) Non-database actions like deleting directories, sending webhooks, scheduling reports should only be done after the current transaction is committed. If we do it immediately, and the transaction is later aborted, then we will have (for example) sent a webhook about an event that didn't actually happen. There's also a secondary benefit to moving this action outside of the transaction; the less time we spend inside a transaction, the better, since a transaction may lock out other clients from working on the affected DB rows. In addition, prevent the affected actions from crashing the view handler with an exception (using the `robust=True` option). I don't think it's reasonable to (for example) return a 500 response to a `PATCH` request just because we failed to send the corresponding webhook. There is one more type of action that should be modified in this way (sending events), but it would be easier to do that after a refactoring that I did in another patch, so I'll do it later.
Currently CVAT is just waiting for the database to start the server process and the worker processes, but if redis instances (for queue and cache processing) are not running we will get a non-functional cvat. This PR adds availability checking for redis_ondisk and redis_inmem
Currently, there are a lot of places where changing one object requires updating the `updated_date` field on other objects. Usually, the `.save` method is used for this purpose, which results in a generic SQL `UPDATE` query that replaces the values in all columns. Introduce and use a specialized method that only changes the date. This provides the following advantages: * Prevents the date updates from overwriting updates to other fields that may happen at the same time. * Possibly makes the updates more efficient due to fewer columns being updated (I have no data on this, though). * Makes it easier to recognize the purpose of the query when analyzing logs/live statistics. * Makes the purpose of the code more obvious. Additionally, update `__save_job_handler`, where we don't want to save _just_ the date, but we still only need to save two fields.
This can provide useful statistics on the use of this functionality. Note that I chose to use the same scope for operations on projects, tasks and jobs, because the import/export operations work more-or-less the same on each of them and have the same parameters. It's still possible to distinguish which type of object the operation was performed on by examining the various `*_id` fields in the event.
Usage statistics on app.cvat.ai show that this format is rarely used, with single-digit numbers of projects/tasks/jobs being exported or imported using this format. Moreover, TensorFlow's popularity appears to be shrinking, so I'm not expecting this format to make a comeback. Meanwhile, supporting this format has a cost that has to be borne by everyone deploying CVAT, because it requires TensorFlow to be installed and loaded. This has various ill effects: 1. Loading time is increased. In my testing, even a command as trivial as `manage.py --help` is slowed down by 3.6 seconds. This may not seem like much, but the effect is compounded, because we have multiple processes (server + workers) all loading the same codebase. Plus, the container entrypoint may execute several Django commands. 2. Memory usage is increased. TensorFlow adds ~100MB of RAM usage per process with data alone; and the libraries add more (although it's hard to estimate the impact of library code, since it can be shared between processes in RAM). 3. Docker image size is increased by ~1.5GB (when unpacked). This is more than half of the current total size! Building time is increased as well. Overall, it seems that the drawbacks of keeping support for this format outweigh the benefits, so it's time to drop it.
cvat-bot
bot
requested review from
azhavoro,
zhiltsov-max,
bsekachev,
mdacoca,
SpecLad and
Marishka17
as code owners
February 23, 2024 10:35
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7510 +/- ##
==========================================
- Coverage 83.59% 83.52% -0.07%
==========================================
Files 374 372 -2
Lines 39742 39666 -76
Branches 3731 3718 -13
==========================================
- Hits 33223 33132 -91
- Misses 6519 6534 +15
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added
dataset:export
anddataset:import
events that are logged when the user initiates an export or import of a project, task or job (Add events for importing/exporting annotations/datasets #7476)Changed
Removed
Fixed
On quality page for a task, only the first page with jobs has quality report metrics (Migrate quality UI changes #7441)
Side effects of data changes, such as the sending of webhooks, are no longer triggered until after the changes have been committed to the database (Defer most signal handling code until after the end of the current transaction #7460, Record DB-related events only after changes are committed #7477)