Show what the model knows on its own screen and let the user set it aside
The Apprendimento screen says in plain words whether the model counts, how well its probabilities hold, which clues it weighs, how the challenger is doing and what it has learned. Thresholds, set-aside and the undo of a promotion live in Impostazioni; anything that shrinks less with real money asks for the phrase. The new tests also caught a wrong column name that broke the Panoramica as soon as the first model existed. refs #66 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
14e8a872dc
commit
f69943f70a
22 files changed
+1680
-27
No files matched your search
@@ -31,6 +31,8 @@
|
||||
"fonte" => "Fonte aggiornata: vale dal prossimo giro delle notizie, tra al massimo 2 minuti.",
|
||||
"chiave" => "Chiave salvata. Non la mostro più: se serve cambiarla, scrivine una nuova.",
|
||||
"chiave-tolta" => "Chiave tolta.",
|
||||
"apprendimento" => "Impostazioni del modello salvate: valgono dalla prossima decisione.",
|
||||
"promozione" => "Promozione annullata: è tornata in carica la versione precedente.",
|
||||
|
||||
_ => "Fatto.",
|
||||
})</p>
|
||||
@@ -41,7 +43,7 @@
|
||||
}
|
||||
|
||||
<nav class="tabs" aria-label="Sezioni delle impostazioni">
|
||||
<a href="#aspetto">Aspetto</a><a href="#conti">Conti</a><a href="#rischio">Rischio</a><a href="#telegram">Telegram</a><a href="#dati">Dati</a><a href="#notizie">Notizie</a><a href="#sicurezza">Sicurezza</a><a href="#sistema">Sistema</a><a href="#modifiche">Modifiche</a>
|
||||
<a href="#aspetto">Aspetto</a><a href="#conti">Conti</a><a href="#rischio">Rischio</a><a href="#telegram">Telegram</a><a href="#dati">Dati</a><a href="#notizie">Notizie</a><a href="#modello">Modello</a><a href="#sicurezza">Sicurezza</a><a href="#sistema">Sistema</a><a href="#modifiche">Modifiche</a>
|
||||
</nav>
|
||||
|
||||
<section class="panel" id="aspetto">
|
||||
@@ -405,6 +407,55 @@
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="panel" id="modello">
|
||||
<h2>Modello</h2>
|
||||
<p class="hint">Il modello non compra mai e non ingrandisce niente: quando avrà superato le sue prove potrà solo rimpicciolire, o non fare, un acquisto che giudica debole. Quanto debole lo decidi qui, in punti di probabilità sotto la frequenza con cui la strategia guadagna di solito. <a href="/apprendimento">Cosa sta facendo</a></p>
|
||||
<form method="post" action="/azioni/modello" class="form-grid">
|
||||
<AntiforgeryToken />
|
||||
@foreach (var m in _model)
|
||||
{
|
||||
var definition = SettingsStore.Definition(m.Key);
|
||||
<label>@ModelLabel(m.Key)
|
||||
<select name="@m.Key" disabled="@(m.ReadOnly || Shell.IsDemo)">
|
||||
@foreach (var choice in definition.Allowed!)
|
||||
{
|
||||
<option value="@choice" selected="@(choice == m.Value)">@ModelChoice(m.Key, choice)</option>
|
||||
}
|
||||
</select>
|
||||
@if (m.ReadOnly)
|
||||
{
|
||||
<span class="hint">Fissato da @m.Source: si cambia lì.</span>
|
||||
}
|
||||
</label>
|
||||
}
|
||||
@if (!Shell.IsDemo)
|
||||
{
|
||||
@if (_anyLive)
|
||||
{
|
||||
<p class="note">Una strategia usa soldi veri: per rimpicciolire meno, o mettere da parte il modello, servono la frase e la password.</p>
|
||||
<label>Scrivi: <code>@StageBook.RaisePhrase</code><input name="frase" autocomplete="off" /></label>
|
||||
<label>Password<input name="password" type="password" autocomplete="current-password" /></label>
|
||||
<label>Codice a sei cifre (se attivo)<input name="codice" inputmode="numeric" autocomplete="one-time-code" /></label>
|
||||
}
|
||||
<button class="btn" type="submit">Salva</button>
|
||||
}
|
||||
</form>
|
||||
<h3>Ultima promozione</h3>
|
||||
@if (_undoTo is { } undo)
|
||||
{
|
||||
<form method="post" action="/azioni/modello/annulla-promozione" class="form-inline">
|
||||
<AntiforgeryToken />
|
||||
<input type="hidden" name="ritorno" value="/impostazioni" />
|
||||
<button class="btn" type="submit" data-confirm="Torna in carica la versione @undo e quella di adesso viene tolta. Continuare?">Annulla l'ultima promozione</button>
|
||||
<span class="hint">Tornerebbe in carica la versione @undo.</span>
|
||||
</form>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="note">Nessuna promozione da annullare.</p>
|
||||
}
|
||||
</section>
|
||||
|
||||
<section class="panel" id="sicurezza">
|
||||
<h2>Sicurezza</h2>
|
||||
@if (Shell.IsDemo)
|
||||
@@ -536,6 +587,8 @@
|
||||
|
||||
private SettingValue _meetings = new(SettingsStore.CentralBankMeetings.Key, "", false, null);
|
||||
private readonly List<SettingValue> _newsRules = [];
|
||||
private readonly List<SettingValue> _model = [];
|
||||
private int? _undoTo;
|
||||
private readonly Dictionary<string, SettingValue> _llm = [];
|
||||
private IReadOnlyList<Anubis.News.NewsSource> _newsSources = [];
|
||||
private readonly Dictionary<string, SecretStatus> _dataKeys = [];
|
||||
@@ -573,6 +626,12 @@
|
||||
_newsRules.Add(await services.Settings.GetAsync(rule.Key, ct));
|
||||
}
|
||||
|
||||
foreach (var setting in Anubis.Learning.LearningSettings.All)
|
||||
{
|
||||
_model.Add(await services.Settings.GetAsync(setting.Key, ct));
|
||||
}
|
||||
|
||||
_undoTo = Shell.IsDemo ? null : await new Anubis.Learning.ModelStore(services.Db).UndoToAsync(ct);
|
||||
foreach (var setting in Anubis.News.NewsModelSettings.All)
|
||||
{
|
||||
_llm[setting.Key] = await services.Settings.GetAsync(setting.Key, ct);
|
||||
@@ -656,6 +715,7 @@
|
||||
"fonte" => "Fonte sconosciuta: ricarica la pagina e riprova.",
|
||||
"chiave" => "La chiave è vuota o contiene spazi: copiala di nuovo così come la dà il servizio.",
|
||||
"chiave-ambiente" => "Questa chiave arriva dalle variabili d'ambiente: si cambia nella configurazione del container.",
|
||||
"promozione" => "Non c'è nessuna promozione da annullare.",
|
||||
"tetto" => $"Il tetto di spesa va scritto in euro, da 0 a {Anubis.News.NewsModelSettings.MaxCap:0}, per esempio 0,50.",
|
||||
"modello" => "Valore non valido per il modello linguistico: il nome come lo dà il servizio, un indirizzo https:// (http:// solo nella tua rete), prezzi da 0 a 200.",
|
||||
|
||||
@@ -705,6 +765,13 @@
|
||||
</form>;
|
||||
}
|
||||
|
||||
private static string ModelLabel(string key) => key == Anubis.Learning.LearningSettings.Full.Key ? "Acquisto intero fino a"
|
||||
: key == Anubis.Learning.LearningSettings.Zero.Key ? "Nessun acquisto da" : "Il modello";
|
||||
|
||||
private static string ModelChoice(string key, string choice) => key == Anubis.Learning.LearningSettings.Aside.Key
|
||||
? choice == "on" ? "Messo da parte: non conta" : "Al suo posto"
|
||||
: choice == "0" ? "Solo alla frequenza di sempre o sopra" : choice + " punti sotto";
|
||||
|
||||
private static string ProviderName(string provider) => provider switch
|
||||
{
|
||||
Anubis.News.NewsModelProviders.Anthropic => "Anthropic (Claude)",
|
||||
|
||||
Reference in new issue
Block a user