davidjurgens / potato

potato: portable text annotation tool
Other
287 stars 48 forks source link

automatic assignment failing #59

Open zjelveh opened 1 year ago

zjelveh commented 1 year ago

I'm trying to setup automatic assignment but keep running into the following error

image

This is my yaml:

{
    "port" : 8754,  

    "annotation_task_name": "record_linking",

    "output_annotation_dir": "annotation_output/record_linking/",

    "output_annotation_format": "csv", 

    "annotation_codebook_url": "",

    "data_files": [
        "data_files/record_pairs.csv"
    ],

    "item_properties": {
        "id_key": "id",
        "text_key": "text",
    },

    "list_as_text": {
      "text_list_prefix_type": 'none',
    },

    "user_config": {
      "allow_all_users": true,     
      "users": [  ],
    },

    "jumping_to_id_disabled": false,

    "hide_navbar": true,

    "alert_time_each_instance": 300,

    #defining the ways annotators entering the annotation system
    "login": {
       "type": 'password',    #can be 'password' or 'url_direct'
       "url_argument": '' # when the login type is set to 'url_direct', 'url_argument' must be setup for a direct url argument login
    },

    "automatic_assignment": {
        "on": true,
        "output_filename": "task_assignment.json",
        "sampling_strategy": "random",
        "labels_per_instance": 1,
        "instance_per_annotator": 1,
        "test_question_per_annotator": 0,
        "users": []
    },

    "annotation_schemes": [
        {
            "annotation_type": "likert",
            "name": "Decision",
            "description": "Do these two records refer to the same person?",
            "labels": [
                {
                    "name": "Not the same person",
                    "tooltip": "Not the same person",
                    "key_value": "No"
                },
                {
                    "name": "Unsure",
                    "tooltip": "Unsure",
                    "key_value": "Unsure"
                },
                {
                    "name": "Same person",
                    "tooltip": "Same person",
                    "key_value": "Yes"
                },
               ],

            "label_requirement": {
                "required": true
            }
        }
    ], 

    "html_layout": "default", 

    "base_html_template": "default",
    "header_file": "default",
    "horizontal_key_bindings": true,

    "site_dir": "default",

    "surveyflow": {
        "on": true,
        "order": [
            # "pre_annotation",
            "post_annotation"
        ],
        # "pre_annotation": [
        #     "surveyflow/consent.jsonl",
        # ],
        "post_annotation": [
            "surveyflow/end.jsonl",
        ],
        "testing": [
        ]
    },
}

Thanks so much for any help

Jiaxin-Pei commented 1 year ago

Hi @zjelveh, thanks a lot for submitting this issue. Previously we assumed a pre_annotation page (as well as a consent question) would be set up when people use automatic assignments, therefore the default setup is to assign the instances to a user when they click yes to the consent question.

I just pushed a fix to this issue. Could you please install the latest version and try again? pip install potato-annotation --upgrade