Skip to main content
To copy labels from one Project to another, both Projects must contain the same data unit. The data unit must have the same title in both Projects. If the Projects use different Datasets, make sure the data unit names match exactly.
Use the following script to copy labels from a source Project to a target Project. Before running the script ensure that you:
  • Replace <private_key_path> with the path to your private key.
  • Replace <source_project_id> with the Project ID of your source Project.
  • Replace <target_project_id> with the Project ID of your target Project.
  • Optionally set the OVERWRITE_STRATEGY
    • skip: Ignores tasks with existing labels.
    • add: Adds all labels from the source Project to the target Project for all tasks.
    • overwrite: Replaces labels in the target Project if they exist in the same data unit.
  • Optionally set the COPY_METHOD to specify the basis for copying, DataHash or DataTitle.
label_copy.py