Docker-сервис, выбор основы и сравнение моделей, сборщик датасета
docker / build (push) Failing after 39s

- Docker: Dockerfile (CPU), compose с FlareSolverr, настройка через DUB_* переменные,
  токен доступа к /predict, tools/pack_models.py, workflow Gitea Actions, docs/docker.md
- Модель грузится офлайн (config.json рядом с весами); общий код вынесен в src/spans.py,
  сервису не нужны sklearn/matplotlib/pandas
- Обучение: профили tiny2/base/large/modern, запуски в models/runs, реестр и честное
  сравнение на одной тестовой выборке (src/runs.py), пункт меню «Модели»
- Датасет: язык и аудио-параметры дорожек, 18+ по строкам «Аудио», ручные метки по ссылкам,
  переиндексация сохранённого HTML, параллельная сборка, сбалансированная выборка
- Тексты страниц (data/pages) больше не хранятся в git

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
DenozordecandClaude Sonnet 5.5 committed 2026-10-28 17:19:10 +07:00
1 parent d155b8584b
commit efc9a4f56a
411 files changed
+87495 -27363

No files matched your search

+24 -23
View File
@@ -1,29 +1,30 @@
# Аудит датасета: data/labels.csv
строк в CSV: 6864
строк после подготовки: 7780 (train 7264 / test 516)
источники: {'kinozal': 107, 'rutracker': 3924, 'nnm': 3749}
уникальных нормализованных текстов: 4205
групп (релиз ∪ одинаковый текст): 834
удалено: пустой текст 0, мусорный studio 20, не-озвучка (оригинал/субтитры) 4, противоречивые дубли 0 (групп-противоречий: 0)
спан автора найден: 5489 (70.6%), не найден: 29
аугментировано морфологических вариантов: 920
дорожек 18+: 316 (из них без упоминания «18» в тексте: 2)
строк в CSV: 41209
строк после подготовки: 48259 (train 42641 / test 5618)
источники: {'kinozal': 13665, 'rutracker': 16539, 'nnm': 18055}
уникальных нормализованных текстов: 17942
групп (релиз ∪ одинаковый текст): 6367
удалено: пустой текст 0, мусорный studio 153, не-озвучка (оригинал/субтитры) 6, противоречивые дубли 0 (групп-противоречий: 0)
спан автора найден: 23631 (49.0%), не найден: 243
аугментировано морфологических вариантов: 7032
дорожек 18+: 720 (из них без упоминания «18» в тексте: 12)
язык размечен: 20371 из 48259; со строкой «Аудио» во входе: 9575; классы: {'RUS': 20166, 'UKR': 150, 'ENG': 55}; редкие (<20, не учатся): {'DEU': 3, 'FRA': 9, 'CHI': 4, 'POL': 2, 'KAZ': 10, 'GEO': 1, 'BEL': 2, 'KOR': 1, 'LAV': 1, 'CZE': 1, 'ITA': 1}
## Распределение translation_type
- проф. многоголосый: 2730
- проф. дубляж: 1909
- авт. одноголосый: 1301
- проф. двухголосый: 616
- одноголосый: 465
- неизвестно: 322
- люб. многоголосый: 184
- многоголосый: 111
- люб. двухголосый: 65
- люб. одноголосый: 46
- двухголосый: 17
- проф. одноголосый: 12
- авт. многоголосый: 1
- авт. двухголосый: 1
- проф. дубляж: 18022
- проф. многоголосый: 13644
- авт. одноголосый: 4199
- неизвестно: 3023
- проф. двухголосый: 2362
- одноголосый: 2189
- люб. многоголосый: 1666
- многоголосый: 1128
- люб. одноголосый: 883
- люб. двухголосый: 707
- проф. одноголосый: 267
- двухголосый: 162
- авт. многоголосый: 5
- авт. двухголосый: 2
## Спан не найден (примеры)
- [rutracker] studio=«datynet; : Куценко» text=«Одноголосый закадровый datynet; перевод: Куценко»
+68 -48
View File
@@ -2,90 +2,110 @@
"history": [
{
"epoch": 0,
"loss": 1.3183794916687508,
"type_accuracy": 0.9898477157360406,
"type_macro_f1": 0.8950140768322586,
"span_exact": 0.8781725888324873,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.8730964467005076
"loss": 1.0322551016006376,
"type_accuracy": 0.9871559633027523,
"type_macro_f1": 0.8369379389908281,
"span_exact": 0.8495412844036697,
"age_accuracy": 0.9926605504587156,
"age_f1": 0.9230769230769231,
"joint_exact": 0.8330275229357799
},
{
"epoch": 1,
"loss": 0.08400902445364862,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9441624365482234,
"loss": 0.06671750026621989,
"type_accuracy": 0.9889908256880734,
"type_macro_f1": 0.9153726455986941,
"span_exact": 0.9174311926605505,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9441624365482234
"joint_exact": 0.9100917431192661
},
{
"epoch": 2,
"loss": 0.027811199083199463,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9543147208121827,
"loss": 0.03165916350924156,
"type_accuracy": 0.9926605504587156,
"type_macro_f1": 0.9186768671962279,
"span_exact": 0.9394495412844037,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9543147208121827
"joint_exact": 0.9321100917431193
},
{
"epoch": 3,
"loss": 0.014210140751885477,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9593908629441624,
"loss": 0.018931047540375744,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.926605504587156,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9593908629441624
"joint_exact": 0.9192660550458716
},
{
"epoch": 4,
"loss": 0.010038099593032,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9593908629441624,
"loss": 0.01237113052410642,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.9431192660550459,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9593908629441624
"joint_exact": 0.9339449541284404
},
{
"epoch": 5,
"loss": 0.008118267866416215,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9593908629441624,
"loss": 0.009695118124439538,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.9467889908256881,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9593908629441624
"joint_exact": 0.9376146788990826
},
{
"epoch": 6,
"loss": 0.006641790677468836,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9593908629441624,
"loss": 0.0085221077923288,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.9431192660550459,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9593908629441624
"joint_exact": 0.9357798165137615
},
{
"epoch": 7,
"loss": 0.007850127838939042,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.9412844036697248,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9339449541284404
},
{
"epoch": 8,
"loss": 0.0069279176914798365,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.9467889908256881,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9394495412844037
}
],
"test": {
"type_accuracy": 0.998062015503876,
"type_macro_f1": 0.9994511276355488,
"span_exact": 0.9515503875968992,
"type_accuracy": 0.996011046333231,
"type_macro_f1": 0.9608362408399977,
"span_exact": 0.9687020558453513,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9496124031007752
"joint_exact": 0.9662473151273396
},
"cv_mean": {
"type_accuracy": 0.991663441018729,
"type_macro_f1": 0.9471573643462868,
"span_exact": 0.9614246403880566,
"age_accuracy": 0.9998013902681231,
"age_f1": 0.9950617283950617,
"joint_exact": 0.9543406976595452
"type_accuracy": 0.9967343071842485,
"type_macro_f1": 0.9581255225864929,
"span_exact": 0.9392830173430274,
"age_accuracy": 0.9997553679873908,
"age_f1": 0.9944724556489263,
"joint_exact": 0.9365250772813656
},
"train_seconds": 457.1
"train_seconds": 1013.3
}
+82 -62
View File
@@ -2,120 +2,140 @@
"history": [
{
"epoch": 0,
"loss": 2.357788513909589,
"type_accuracy": 0.8527918781725888,
"type_macro_f1": 0.45105374473910137,
"span_exact": 0.6598984771573604,
"age_accuracy": 0.9796954314720813,
"loss": 1.8807837918323556,
"type_accuracy": 0.9211009174311927,
"type_macro_f1": 0.6878025559450562,
"span_exact": 0.5155963302752293,
"age_accuracy": 0.9486238532110092,
"age_f1": 0.0,
"joint_exact": 0.5685279187817259
"joint_exact": 0.44403669724770645
},
{
"epoch": 1,
"loss": 0.3179771784726564,
"type_accuracy": 0.9949238578680203,
"type_macro_f1": 0.9047619047619048,
"span_exact": 0.7918781725888325,
"loss": 0.19847860801096406,
"type_accuracy": 0.9743119266055046,
"type_macro_f1": 0.9018587930989455,
"span_exact": 0.7981651376146789,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.7868020304568528
"joint_exact": 0.7853211009174312
},
{
"epoch": 2,
"loss": 0.09052751894603979,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.8984771573604061,
"loss": 0.07505214461390836,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.8330275229357799,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.8984771573604061
"joint_exact": 0.8293577981651377
},
{
"epoch": 3,
"loss": 0.04577947580800937,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.8984771573604061,
"loss": 0.04440977191069969,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.8807339449541285,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.8984771573604061
"joint_exact": 0.8733944954128441
},
{
"epoch": 4,
"loss": 0.02791464072022889,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9086294416243654,
"loss": 0.028807769589840285,
"type_accuracy": 0.9889908256880734,
"type_macro_f1": 0.9096810438971369,
"span_exact": 0.8660550458715597,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9086294416243654
"joint_exact": 0.8605504587155963
},
{
"epoch": 5,
"loss": 0.018031590601412562,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9187817258883249,
"loss": 0.022258058590862728,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9155121981076735,
"span_exact": 0.8954128440366973,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9187817258883249
"joint_exact": 0.8880733944954129
},
{
"epoch": 6,
"loss": 0.01446260221151484,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9238578680203046,
"loss": 0.017832277844529697,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9155121981076735,
"span_exact": 0.9045871559633027,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9238578680203046
"joint_exact": 0.8972477064220183
},
{
"epoch": 7,
"loss": 0.010811449653628442,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9187817258883249,
"loss": 0.014963243124099362,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.8862385321100917,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9187817258883249
"joint_exact": 0.8788990825688073
},
{
"epoch": 8,
"loss": 0.00876794363632127,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9187817258883249,
"loss": 0.012998920554111813,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.9119266055045872,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9187817258883249
"joint_exact": 0.9045871559633027
},
{
"epoch": 9,
"loss": 0.007425106120052504,
"type_accuracy": 1.0,
"type_macro_f1": 1.0,
"span_exact": 0.9187817258883249,
"loss": 0.011474552309777529,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.9100917431192661,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9187817258883249
"joint_exact": 0.9027522935779817
},
{
"epoch": 10,
"loss": 0.010157171327384295,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.9027522935779817,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.8954128440366973
},
{
"epoch": 11,
"loss": 0.009997131634706275,
"type_accuracy": 0.9908256880733946,
"type_macro_f1": 0.9158000930443979,
"span_exact": 0.9045871559633027,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.8972477064220183
}
],
"test": {
"type_accuracy": 0.998062015503876,
"type_macro_f1": 0.9988596309351027,
"span_exact": 0.9244186046511628,
"type_accuracy": 0.9941699907947223,
"type_macro_f1": 0.9576679877290362,
"span_exact": 0.941699907947223,
"age_accuracy": 1.0,
"age_f1": 1.0,
"joint_exact": 0.9244186046511628
"joint_exact": 0.9389383246394599
},
"cv_mean": {
"type_accuracy": 0.992359410461513,
"type_macro_f1": 0.9481550900377457,
"span_exact": 0.9389851791472488,
"age_accuracy": 0.9996027805362463,
"age_f1": 0.9903614457831325,
"joint_exact": 0.9332879013203975
"type_accuracy": 0.9945265233277791,
"type_macro_f1": 0.9549157743958997,
"span_exact": 0.9167176505761322,
"age_accuracy": 0.9994757007005666,
"age_f1": 0.9892257817741743,
"joint_exact": 0.9125275899299806
},
"train_seconds": 156.0
"train_seconds": 589.2
}
+2 -2
View File
@@ -2,7 +2,7 @@
| модель | type acc | type macro-F1 | span exact | age acc | joint exact | время, с |
|---|---|---|---|---|---|---|
| tiny2 | 0.998 | 0.999 | 0.924 | 1.000 | 0.924 | 156.0 |
| base | 0.998 | 0.999 | 0.952 | 1.000 | 0.950 | 457.1 |
| tiny2 | 0.994 | 0.958 | 0.942 | 1.000 | 0.939 | 589.2 |
| base | 0.996 | 0.961 | 0.969 | 1.000 | 0.966 | 1013.3 |
Лучшая модель: **base** -> `models/best`