(engine: "Engine")
| 6 | |
| 7 | |
| 8 | def create_evaluate(engine: "Engine") -> Dict[str, "Component"]: |
| 9 | input_pipeline_elems = set(engine.manager.get_elem_list_without_accordion()) |
| 10 | with gr.Tab() as evaluate_tab: |
| 11 | with gr.Row(): |
| 12 | with gr.Column(scale = 3): |
| 13 | with gr.Row(): |
| 14 | data_dir = gr.Textbox(interactive = True) |
| 15 | dataset_name = gr.Dropdown( |
| 16 | choices = [], |
| 17 | value = None, |
| 18 | interactive = True |
| 19 | ) |
| 20 | dataset_split = gr.Dropdown( |
| 21 | choices = [], |
| 22 | value = None, |
| 23 | interactive = True |
| 24 | ) |
| 25 | with gr.Row(): |
| 26 | save_intermediate_data = gr.Checkbox( |
| 27 | value = True, |
| 28 | interactive = True |
| 29 | ) |
| 30 | save_dir = gr.Textbox(interactive = True) |
| 31 | save_note = gr.Textbox(interactive = True) |
| 32 | |
| 33 | with gr.Row(): |
| 34 | # TODO: auto download from huggingface |
| 35 | seed = gr.Textbox(interactive = True) |
| 36 | test_sample_num = gr.Number( |
| 37 | value = 10, |
| 38 | interactive = True |
| 39 | ) |
| 40 | random_sample = gr.Checkbox( |
| 41 | value = False, |
| 42 | interactive = True |
| 43 | ) |
| 44 | |
| 45 | with gr.Row(): |
| 46 | use_metrics = gr.Dropdown( |
| 47 | multiselect = True, |
| 48 | choices = METRICS, |
| 49 | value = METRICS[:4], |
| 50 | interactive = True |
| 51 | ) |
| 52 | save_metric_score = gr.Checkbox( |
| 53 | value = True, |
| 54 | interactive = True |
| 55 | ) |
| 56 | |
| 57 | with gr.Column(scale = 1): |
| 58 | with gr.Row(variant = 'panel'): |
| 59 | evaluate_output_box = gr.Markdown( |
| 60 | height = 350, |
| 61 | show_copy_button = True |
| 62 | ) |
| 63 | with gr.Row(): |
| 64 | evaluate_preview_btn = gr.Button( |
| 65 | value = None, |
no test coverage detected