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

Release v2.11.1 #7554

Merged
merged 14 commits into from
Mar 5, 2024
Merged

Release v2.11.1 #7554

merged 14 commits into from
Mar 5, 2024

Conversation

cvat-bot[bot]
Copy link
Contributor

@cvat-bot cvat-bot bot commented Mar 5, 2024

Added

Fixed

cvat-bot bot and others added 14 commits February 23, 2024 12:14
…event (#7511)

The first problem is that in the following case, the algorithm would
accrue more working time than was actually spent:

              A
        |-----------|
    ---------+------------+------> time
             B            C

A, B and C are events. Let's say that Te(A) is the timestamp of the end
of A, while T(B) and T(C) are the timestamps of B and C, respectively.

The current code in `ClientEventsSerializer.to_internal_value` adjusts
`last_timestamp` after processing every event. After A is processed,
`last_timestamp` is set to Te(A). After B is processed, `last_timestamp`
goes _backwards_ to T(B). So when the algorithm calculates the working
time for C, it gets T(C) - T(B), when the correct answer is T(C) -
Te(A). The span from T(B) to Te(A) gets counted twice.

Fix this by rewriting the algorithm, so that `last_timestamp` (now
renamed `previous_end_timestamp`) can only go forwards.

-----

The second problem is that the algorithm is unable to calculate the
working time for the first event in each batch that the client sends.
This is because to calculate working time for an event, you need the
timestamp/duration of the previous event, and this information is
unavailable for the first event in the batch.

Fix this by resending the most recently sent event along with each
batch, and using it to initialize the algorithm.
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Merging #7554 (925ae6a) into master (2c5bb69) will increase coverage by 0.00%.
Report is 12 commits behind head on master.
The diff coverage is 80.98%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7554   +/-   ##
=======================================
  Coverage   83.52%   83.53%           
=======================================
  Files         372      372           
  Lines       39666    39661    -5     
  Branches     3718     3724    +6     
=======================================
- Hits        33131    33129    -2     
+ Misses       6535     6532    -3     
Components Coverage Δ
cvat-ui 79.41% <81.11%> (+0.01%) ⬆️
cvat-server 87.31% <80.00%> (-0.01%) ⬇️

@cvat-bot cvat-bot bot merged commit 8ea8391 into master Mar 5, 2024
31 checks passed
@cvat-bot cvat-bot bot deleted the release-2.11.1 branch March 5, 2024 19:29
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.

9 participants