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

feat: OPTIC-1095: Send the started_at time of when annotation work had began #6408

Merged
merged 10 commits into from
Oct 2, 2024

Conversation

bmartel
Copy link
Contributor

@bmartel bmartel commented Sep 18, 2024

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

Based on @wesleylima's investigation work into better reporting of lead_time's, we have to be sending when work actually started with regards to a given task, so that every history item reflects the period in which work was performed.

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

Which logical domain(s) does this change affect?

Annotation History, Annotation Draft, Annotation.


🚀 This description was created by Ellipsis for commit 15285f7

feat: add started_at timestamp for annotation start tracking in LSFWrapper

Summary:

Adds started_at timestamp to track when annotation work began in LSFWrapper in lsf-sdk.js.

Key points:

  • Behavior:
    • Adds started_at timestamp to annotation results in LSFWrapper in lsf-sdk.js.
    • Calculates started_at as the earliest of draft creation or loadedDate, adjusted for draft lead time.
    • Ensures started_at does not exceed current time, defaults to loadedDate if so.
  • Misc:
    • Updates prepareData() function to include started_at in the result object.

Generated with ❤️ by ellipsis.dev

@github-actions github-actions bot added the feat label Sep 18, 2024
Copy link

netlify bot commented Sep 18, 2024

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 4422e6a
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/66f6f509451f1900081d7bff

Copy link

netlify bot commented Sep 18, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 4422e6a
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/66f6f5097c43970008d0a41f

@bmartel
Copy link
Contributor Author

bmartel commented Sep 18, 2024

@ellipsis-dev review this

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 15285f7 in 20 seconds

More details
  • Looked at 34 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. web/libs/datamanager/src/sdk/lsf-sdk.js:930
  • Draft comment:
    The calculation of adjustedStartedAt seems incorrect. It should subtract draftLeadTime from draftStartedAt instead of adding it. This will correctly adjust for the time the user was not actively labeling.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The logic in the code seems to be that draftLeadTime is the time spent on the draft, and adding it to draftStartedAt gives the total time including the draft. The comment suggests subtracting, which would imply reducing the start time by the draft time, which doesn't make sense in this context. The comment seems incorrect.
    I might be misunderstanding the purpose of draftLeadTime. If it represents time not spent on the draft, then subtraction would make sense. However, the code comments suggest it is time spent, supporting addition.
    The code comments explicitly state that draftLeadTime is subtracted from the current time to adjust the start time, which aligns with the code's logic of adding it to draftStartedAt. This supports the idea that the comment is incorrect.
    The comment is incorrect because the logic of adding draftLeadTime to draftStartedAt aligns with the code's purpose of adjusting for time spent on the draft. The comment should be deleted.

Workflow ID: wflow_WFnPElUT4eFmTclx


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

2 days left in your free trial, upgrade for $20/seat/month or contact us.

…ead time, with a min value being the draftStartedAt time.
Copy link
Contributor

@yyassi-heartex yyassi-heartex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just need a clarification of expectation - otherwise approved

@robot-ci-heartex
Copy link
Collaborator

Follow Merge downstream workflow has been failed.

Workflow run

@robot-ci-heartex
Copy link
Collaborator

Follow Merge downstream workflow has been failed.

Workflow run

@yyassi-heartex yyassi-heartex merged commit 86d9d31 into develop Oct 2, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants