{{ ui_lang.training_heading|default('Training') }}

{{ ui_lang.training_lede|default('Fit a model on the annotations you already have, then send its predictions back as prelabels for review. Each run records what it trained on and which items it held out, so the score on this page is measured on data the model never saw.') }}

{{ ui_lang.training_start_heading|default('Start a run') }}

{% if not trainers %}

{{ ui_lang.training_no_trainers|default('No trainers are registered.') }}

{% else %}

{% endif %} {#- A bare div conveys nothing to a screen reader, so the only signal a non-sighted admin gets that a long run is progressing is silence. -#}
{% if not writeback.get('schemas') %}
{{ ui_lang.training_writeback_off|default('Predictions are stored but not shown to annotators. Name the schemas under model_training.writeback.schemas to turn prelabels on — worth doing only once a run\'s held-out score justifies it, because prelabels bias annotators toward accepting them.') }}
{% endif %}

{{ ui_lang.training_runs_heading|default('Runs') }}

{% if not runs %}

{{ ui_lang.training_no_runs|default('No runs yet.') }}

{% else %}
{% for r in runs %} {{ r.backend or 'local' }} {% endfor %}
{{ ui_lang.training_col_run|default('Run') }} {{ ui_lang.training_col_status|default('Status') }} {{ ui_lang.training_col_trainer|default('Trainer') }} {{ ui_lang.training_col_backend|default('Ran on') }} {{ ui_lang.training_col_schemas|default('Schemas') }} {{ ui_lang.training_col_train|default('Train') }} {{ ui_lang.training_col_val|default('Val') }} {{ ui_lang.training_col_score|default('Held-out score') }} {{ ui_lang.training_col_duration|default('Duration') }}
{{ r.run_id }} {{ r.status }}{% if r.status == 'waiting' and r.run_id in queue_positions %} #{{ queue_positions[r.run_id] }}{% endif %} {%- if r.status == 'waiting' %} {%- endif %} {{ r.trainer }} {{ r.schema_names|join(', ') }} {{ r.n_train }} {{ r.n_val }} {#- Only a score measured on val or test goes here. Training-set accuracy used to fill this column, and a model scores well on the data it was fitted on whatever it learned. -#} {%- set score = r.metrics.get('heldout_score') -%} {%- if score is number %}{{ '%.3f'|format(score) }}{% else %}not scored{% endif -%} {%- if r.duration %}{{ '%.1fs'|format(r.duration) }}{% else %}—{% endif -%}
{% endif %}

{{ ui_lang.training_trainers_heading|default('Trainers') }}

{% for t in trainers %} {% endfor %}
{{ ui_lang.training_col_name|default('Name') }} {{ ui_lang.training_col_handles|default('Handles') }} {{ ui_lang.training_col_modalities|default('Modalities') }} {{ ui_lang.training_col_licence|default('Licence') }} {{ ui_lang.training_col_available|default('Available') }}
{{ t.name }} {{ t.kinds|join(', ') }} {{ t.modalities|join(', ') }} {{ t.licence }}{% if t.licence_ack %} {{ ui_lang.training_ack_required|default('confirm before use') }}{% endif %} {%- if not t.available -%} {{ t.install_hint or t.unavailable_reason or ui_lang.training_no|default('no') }} {%- elif t.config_problem -%} {{ t.config_problem }} {%- else -%} {{ ui_lang.training_yes|default('yes') }} {%- endif -%}