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

Update CVAT upstream #15

Open
wants to merge 3,614 commits into
base: develop
Choose a base branch
from

Conversation

johnanthonyjose
Copy link

Motivation and context

How has this been tested?

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

SpecLad and others added 30 commits October 24, 2024 17:33
Rather than retag the Docker images, it seems like we can just build
them with correct tags to start with.
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/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://docs.cvat.ai/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. -->
It currently uses an auxiliary Docker Hub account to temporarily store
the images, but all other workflows have long ago switched to using
workflow artifacts. Switch this workflow too, by replacing all
image-handling code with the equivalents from `main.yml`.

The main reason to do this is to fix a bug in the workflow: the
`unit_testing` job tags the `cvat/*` images as `:latest`, but the
Compose file wants the `:dev` tag. So the images end up being
redownloaded from Docker Hub.

There are also a few other reasons why the new version is better:

* It avoids unnecessary complexity, viz. the usage of Docker Hub, an
external service.

* It's consistent with the other pipelines, which should make future
changes easier.

* It's much less code.

### 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. -->
Test run: <https://github.com/cvat-ai/cvat/actions/runs/11504222821>.
You can see that at no point it pulls the `cvat/server` or `cvat/ui`
images from GitHub.

### 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/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))~~

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Chores**
- Updated workflow configuration to streamline artifact management for
image builds.
	- Removed Docker Hub interactions for building and testing images.
- Introduced a new environment variable `CVAT_VERSION` for tagging
images.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/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://docs.cvat.ai/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. -->
When a status check for `request` is failing for any reason, eg
something happened on the server and the request failed with 50X error.
The requests page crushes with an error: `Cannot read property 'target'
of undefined` :

![image](https://github.com/user-attachments/assets/e41ea391-c03e-47cd-9ab0-1e06583d366c)

Now the error message is shown:

![image](https://github.com/user-attachments/assets/e9976657-2fc8-4be8-94b4-1d5453b9d9ab)


### 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
- [x] 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))~~
- [x] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

- **New Features**
- Enhanced request handling with improved initialization and error
management for tasks and jobs.
- Added `listenToCreate` method in the Task class for better task
creation management.
- Introduced `generateInitialRequest` function to standardize request
initialization across imports and exports.

- **Bug Fixes**
- Improved clarity of status messages for failed requests in the
RequestCard component.

- **Documentation**
- Updated method signatures across various action files for better
clarity and consistency.

- **Chores**
- Refined import statements and type exports in the core wrapper to
streamline functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/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://docs.cvat.ai/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. -->

Fixed several issues:
- GT tags are rendered with `(GT)` mark inside of GT job which is not
correct
- GT tags can not be deleted via `x` button inside the GT job

Other improvements:
- Refactored `frame-tags` component code
- Improved styles for gt/non-gt tags, as they are too close:

![image](https://github.com/user-attachments/assets/a5b1c055-4ee0-4469-ada2-21a6a70146ee)
->

![image](https://github.com/user-attachments/assets/49eb4625-1690-4865-b94f-973cee351183)

Related #8547
### 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/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced state management in the FrameTags component for improved
performance and readability.
- Introduced a new CSS class to manage spacing in the tag annotation
workspace.

- **Bug Fixes**
	- Updated tag filtering logic to improve accuracy in displaying tags.

- **Refactor**
- Simplified component structure by utilizing hooks for state
management.
	- Optimized rendering logic and performance with memoization.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Starting with Python 3.9, `with` allows parenthesized context managers,
which black will use when needed.
Test it by starting an HTTPS server (that forwards all requests to CVAT)
and attempting to access that server via the CLI. This allows us to test
that the option actually works end-to-end, and avoids dependencies on
CLI internals.

The new test requires `main` to catch the exception that is raised in
the case of a certificate error, so implement that.
…8617)

Some of them are annotated with an `Iterator` return type. However...

It just occurred to me that `@contextmanager` cannot work with a
function that returns a plain iterator, since it relies on the generator
class's `throw` method. `contextmanager` is defined in typeshed as
accepting an iterator-returning function, but that appears to be a bug:
<python/typeshed#2772>.

Change all such annotations to a `Generator` type instead.

Some annotations are also broken in other ways; fix them too.
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/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://docs.cvat.ai/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. -->
Added ability to hide a mask during editing

![hide-mask](https://github.com/user-attachments/assets/d8261e8e-4e83-47c3-9620-937e409ce2ba)


### 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
- [x] 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))~~
- [x] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

- **New Features**
- Added the ability to hide edited objects in the canvas configuration.
  - Enhanced drawing functionality with visibility controls for shapes.
  - Introduced new methods for managing the state of edited annotations.

- **Bug Fixes**
  - Improved handling of drawing actions based on visibility states.

- **Documentation**
- Updated interfaces and action types to reflect new features and state
management capabilities.

- **Chores**
  - Refined component logic to support new visibility state management.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Boris Sekachev <boris.sekachev@yandex.ru>
It is not used for anything
Make the Black workflow just run black with default settings. Instead of
including specific directories, exclude the ones that haven't been
blackened yet via `pyproject.toml`.

Leave a few small files out of the exclusion list; blacken them instead.

This is one step towards project-wide code formatting. It also makes it
easier to format your entire patch when you touch multiple components,
since you don't have to remember which directories to apply `black` to.
Since we just dropped support for Python 3.8, we don't need to keep
using the old imports anymore.

This patch was produced by `ruff check --select=UP006,UP035
--target-version=py39 --fix --unsafe-fixes` (with a couple of manual
fixes where ruff coudn't do it by itself).

I'd like to apply this across the entire codebase, but since it produces
a large amount of churn, I'd rather do it piecemeal.
In particular, the SDK contains generated code with `typing` imports,
but since I can't fix that automatically, I'm going to delay it until
another PR.
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/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://docs.cvat.ai/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. -->
Newly introduced `random_per_job` option for frame selection method
doesnt work properly on create job page. This patch fixes it.
Resolve #8599

### 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
- [x] 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~~
- [x] 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))
- [x] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

- **New Features**
- Enhanced job initialization flexibility by allowing optional
properties.
	- Improved job creation process with structured handling of job data.

- **Bug Fixes**
- Adjusted loading spinner display logic for better user feedback during
task fetching.

- **Documentation**
	- Updated copyright notice to reflect the year 2024.

- **Style**
- Standardized property naming conventions across job-related interfaces
for clarity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The main goal for this refactoring is to co-locate all code responsible
for each command. Currently, such code is spread across 3 places:

* parser configuration in `parser.py`;
* implementation in `cli.py`;
* name-to-code mapping in `__main__.py`.

This patch combines all three aspects of each command in a single class
following a common protocol. This makes it easier to add/modify
commands.

In addition, I made the following changes:

* Moved most code into an `_internal` package, to discourage external
  code from using it.

* Split off some code into dedicated modules.

* Added a `CommandGroup` class that itself implements the `Command`
  protocol. This makes it possible to implement command hierarchies in the
  future.

* Redid the somewhat hacky way in which the code determined which
  options to pass to the command implementation. Now we pop all common
  options when we process them, which means all remaining options belong
  to the command. I had to mark some of the `create` options with
  `default=argparse.SUPPRESS` to make this work.

* Replaced the descriptions for some of the commands with the docstring
  of the implementation functions, which had more details. Removed the
  docstrings themselves, which were redundant.

* Removed the `RawTextHelpFormatter` from the `create` argument parser,
  to ensure consistent help formatting between commands. Adjusted the
  `--filename_pattern` option description to compensate.

* Cleaned up the signatures of implementation functions: made all
  parameters except the client kw-only, removed default values (which
  would never be used), removed parameters that didn't correspond to any
  command-line options, fixed some parameter types.

Other than the command description updates, none of the changes here
should affect the external behavior of the CLI.
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/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://docs.cvat.ai/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. -->

The test can fail sometimes because of the random endpoint behavior
(this is by design). Allow some flexibility in expected cases

### 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! -->
- [ ] 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/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [ ] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved reliability of REST API tests related to task management by
adding a retry mechanism for random outcomes.

- **Tests**
- Introduced a new constant to manage random test attempts, enhancing
the robustness of specific test cases.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/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://docs.cvat.ai/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. -->
Test and docs for #8554

### 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~~
- [x] I have added tests to cover my changes
- [x] 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))
- [x] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/cvat-ai/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/cvat-ai/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/cvat-ai/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/cvat-ai/cvat/tree/develop/cvat-ui#versioning))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Tests**
- Introduced a new test case to verify the functionality of hiding and
showing masks through both button clicks and keyboard shortcuts.
- Enhanced the test suite with comprehensive checks for the hide mask
feature, ensuring expected behavior during UI interactions and editing.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Boris Sekachev <boris.sekachev@yandex.ru>
And also `abstractstaticmethod`, which was deprecated in 3.3.

This is a continuation of #8626.
cvat-bot bot and others added 30 commits January 28, 2025 07:01
Now that GHSA-wq36-mxf8-hv62 is fixed, it is actually safe to use
jsonpickle in this context.
Added a simple button to quickly copy frame name.
…default) (#9008)

This PR removes the `disableDistinctCachePerService` setting.
Previously this cache was used to cache chunks of data on storage, which
is not relevant now.
Currently only events need to be stored before being sent to Vector, and
this will always be cached for each service, so these settings are no
longer needed.

<!-- Raise an issue to propose your change
(https://github.com/cvat-ai/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://docs.cvat.ai/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. -->

### 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))

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/cvat-ai/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.
Change location of events cache dir
- Added lazy ellipse mask / RLE computation (OpenCV's ellipse() is quite slow with big masks)
- Removed simultaneous mask materialization for all masks on the image in segmentation matching
- Added batch size restriction in bulk saving of quality reports
This has two main goals:

1. Move all validation that does not depend on the task we're annotating
   from `_AnnotationMapper` and to `DetectorFunctionSpec`. This a) splits
   the code into more manageable chunks, and b) works better with the agent
   workflow, because the CLI `function` commands can reject an invalid
   function spec immediately (rather than waiting until the first request).

   (Frankly, I don't know why I didn't put this code in
   `DetectorFunctionSpec` in the first place, given that it implements the
   restrictions described in the docstring...)

   Validating the spec upon construction requires that the spec is not
   modified afterwards. This has always been my intention, but to make it
   clearer, state it explicitly in the docstring.

2. Restructure the rest of the code into smaller functions. This should
   not introduce any differences in behavior.
Added an input field to detector runner UI with threshold parameter. Theparameter already supported by the server.
Removed mentions of Masked RCNN from the website and README
Updated detectors documentation screenshots
These are unnecessary and when they're not updated in sync with
`docker-compose.yml` (like now) they cause HTTPS deployments to use an
outdated version of Traefik.
…ing (#9005)

These changes are meant to enforce several conditions:

1. A function should not be able to create shapes of type incompatible
   with the type of the label it declares (for example, if a
   function's label has type `rectangle`, it should not be able to create
   ellipses with that label).

2. A function should not be able to create shapes of type incompatible
   with the type of the label in the task being annotated.

3. If a function's declared label has a type incompatible with the type
   of the corresponding task label, then it should not run at all (since it
   would be impossible for it to output a shape with that label that
   wouldn't violate either condition 1 or 2).

Altogether, these restrictions ensure that we don't create any shapes in
a task that aren't compatible with that task's label types.

In addition, set explicit label types for the predefined functions.
Continuing to remove black exceptions.
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.