Expand description
Training again by itself (docs/spam-filter.md, “Training by itself”): on
the computer that made the table in use, once a week at most after the
last training (by hand or by itself), when it is on mains power, not
saving power, idle for 15 minutes or locked, and no focus session runs;
on a metered connection, without downloading first. A job run apart
(sioul spam train --by-itself), at the lowest priority, on half the
cores, with the usual rule for replacing the table; stopped through its
stop file when the computer is unplugged or starts saving power, to try
again later. Never a notification: the settings say when it last trained
by itself, and whether its table replaced the one in use.
decide is the rule, a pure function of what is known (Facts); an
unknown fact counts as not holding. facts reads them, the cheap ones
first: the system is asked about its power and its session only when
nothing else holds a training back. What the last run by itself did is
kept beside the last training’s summary (Run, auto.toml). The
window asks at its minute, sioul watch at its own; the command line
starts the job.
Structs§
Enums§
- Decision
- What to do now.
- Outcome
- How a run by itself ended.
- Trainer
- Who made the table in use.
- Wait
- Why it does not train now.
Constants§
- AFTER_
FAILURE - After one that failed, or whose process vanished: the soonest it tries again.
- AFTER_
STOP - After a run by itself stopped (unplugged, saving power): the soonest it tries again.
- SUPPLY_
EVERY - How often a run by itself asks whether its power still allows it.
- WEEK
- The least time between two trainings, by hand or by itself.
Functions§
- a_
job_ runs - Whether a job of the spam filter runs, a download or a training: its
process holds its lock (
$XDG_STATE_HOME/sioul/spam/jobs/<id>.lock). - decide
- The rule: every condition must hold, an unknown one counting as not
holding; the cheap ones are looked at first (
factsasks the system only when a training waits on its power alone). - facts
- What is known now: the setting (
enabled), the table in use and the files of the last trainings, the jobs, a focus session (focus:sioul_core::timelog::running); then, only when nothing else holds a training back, what the system says (power, asked once).here: this computer’s name, as a table records it (sioul_sync::lease::host_name);window_trains: the window’s own training runs (“Train now”). - threads
- fastText’s threads for a run by itself: half the cores, one at least.
- trainer
- Who made the table in use (the Porch’s: this one, else the one before when this one is refused), by the name it records.
- watch_
supply - While a run by itself goes on: its power asked every
every(supply); unplugged or saving power, or twice in a row unable to tell,stopis called once and the watch ends; it ends too as soon asdonesays the run did.