Label / Activity logs

Label logs serve as a comprehensive record of actions performed within the Encord platform's Label Editor.

Viewing label logs

The following scripts show how to view label logs for:

  • All data units of a Project in a specified time frame. The example specifies this time frame to be 1 week.
  • A specific data unit, and made by a specific user.

In the following script, ensure that you:

  • Replace <private_key_path> with the path to your private key.
  • Replace <project_hash> with the hash of the Project you want to view label logs for
  • If you are using the Time frame script, replace weeks=1 with the time frame you want to view label logs for.
  • If you are using the User and Data unit script, replace <data_hash> with the hash of the data unit you want to view label logs for.
# Import dependencies
from encord import EncordUserClient
import datetime

# Instantiate Encord client. Replace <private_key_path> with your private key path
user_client = EncordUserClient.create_with_ssh_private_key(
  ssh_private_key_path="<private_key_path>"
  )

# Define your Project
project = user_client.get_project(project_hash="<project_hash>")

# Prints the label actions. Change the number of weeks if necessary.
for log_line in project.get_label_logs(after=datetime.datetime.now() - datetime.timedelta(weeks=1)):
    print(log_line)
# Import dependencies
from encord import EncordUserClient
import datetime

# Instantiate Encord client. Replace <private_key_path> with your private key path
user_client = EncordUserClient.create_with_ssh_private_key(
  ssh_private_key_path="<private_key_path>"
  )

# Define your Project
project = user_client.get_project(project_hash="<project_hash>")

# Prints the label actions   
for log_line in project.get_label_logs(data_hash="<data_hash>", user_email='my_user@my_domain.com'):
    print(log_line)

Label log content

ℹ️

Note

Actions do not need to be submitted to appear in the log.

Logs are generated in chronological order and contain the following:

Log entryDescriptionNote
log_hashThis log entry's ID
user_hashThe user's ID
user_emailThe user's email address
annotation_hashThe label instance's ID"None" for actions that aren't labels or attributes
identifierThe label instance's ID"None" for actions that aren't labels or Attributes
data_hashThe data unit's ID
feature_hashThe ontology feature's IDA feature can have multiple instances. Equivalent to the featureNodeHash found in the ontology's JSON
actionThe action this log entry refers toPlease see the actions section for full details
label_nameThe label's nameAs specified in the ontology. Attributes are not named.
time_takenThe time taken to create the label (in milliseconds)"None" for non-labeling related actions
created_atThe date and time the label action madeDate and time are given in the UTC time zone for all users
frameThe frame number the action was taken on"None" refers to the first frame

Log actions

The table below provides descriptions of all log actions.

ActionDescription
0Add a label
1Edit a label
2Delete a label
3Start labeling
4End labeling
11Submit a task
12Approve a label
13Reject a label
14Click Save
15Click Undo
16Click Redo
17Using bulk label operations
19Zoom into the frame
20Adjust the brightness
21Using hotkeys
22Open the editor settings
23Add a classification or attribute
24Edit a classification or attribute
25Delete a classification or attribute
26Approve a classification or attribute
27Reject a classification or attribute
28Submit an object or a classification label for review
29Submit an attribute for review
30The buffering icon appeared when the video was loading
31A bitrate warning was shown
32The 'Seeking' overlay way shown when skipping to a specific frame in a video

Use cases

Tutorial: Checking Rejection and Approval rates for a Project

Label logs provide a detailed record of actions taken during the labeling process. You can use these logs to analyze the rejection and approval rates of labels.

  • Use the recipe provided above to view label logs.

  • Filter log entries related to the actions "Approve a label" (Action 12) and "Reject a label" (Action 13).

  • Calculate Rejection and Approval Rates.

    1. Divide the number of approved or rejected tasks by the total number of reviewed tasks.
    2. To see the rate as a percentage, multiply the result by 100.