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 entry | Description | Note |
---|---|---|
log_hash | This log entry's ID | |
user_hash | The user's ID | |
user_email | The user's email address | |
annotation_hash | The label instance's ID | "None" for actions that aren't labels or attributes |
identifier | The label instance's ID | "None" for actions that aren't labels or Attributes |
data_hash | The data unit's ID | |
feature_hash | The ontology feature's ID | A feature can have multiple instances. Equivalent to the featureNodeHash found in the ontology's JSON |
action | The action this log entry refers to | Please see the actions section for full details |
label_name | The label's name | As specified in the ontology. Attributes are not named. |
time_taken | The time taken to create the label (in milliseconds) | "None" for non-labeling related actions |
created_at | The date and time the label action made | Date and time are given in the UTC time zone for all users |
frame | The frame number the action was taken on | "None" refers to the first frame |
Log actions
The table below provides descriptions of all log actions.
Action | Description |
---|---|
0 | Add a label |
1 | Edit a label |
2 | Delete a label |
3 | Start labeling |
4 | End labeling |
11 | Submit a task |
12 | Approve a label |
13 | Reject a label |
14 | Click Save |
15 | Click Undo |
16 | Click Redo |
17 | Using bulk label operations |
19 | Zoom into the frame |
20 | Adjust the brightness |
21 | Using hotkeys |
22 | Open the editor settings |
23 | Add a classification or attribute |
24 | Edit a classification or attribute |
25 | Delete a classification or attribute |
26 | Approve a classification or attribute |
27 | Reject a classification or attribute |
28 | Submit an object or a classification label for review |
29 | Submit an attribute for review |
30 | The buffering icon appeared when the video was loading |
31 | A bitrate warning was shown |
32 | The '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.
- Divide the number of approved or rejected tasks by the total number of reviewed tasks.
- To see the rate as a percentage, multiply the result by 100.