Commit Graph

2 Commits

Author SHA1 Message Date
rpotter6298 3bc31f9f68 Hand nightly training to an external_tcn service when configured
Set ASTRAPE_TCN_TRAINER_URL and the scheduler ships raw series to that
service and writes back the artifact it returns, instead of training in
process. This host has no AVX2 and torch dies with SIGILL in Adam, so remote
is the working path here; local training stays for hosts that can do it.

run() now picks between _train_local and _train_remote. The remote path never
builds examples locally -- it only reads the database -- and the far side
rebuilds them with the same gibil. The artifact is written last and
atomically, because the oracle daemon loads it on every forecast. A remote
failure raises SystemExit so the unit fails visibly rather than leaving
yesterday's model in place while reporting success. Events record trained_by,
trainer_url and job_id.

Also stops deriving the model, state and log paths from __file__. Where this
package is installed says nothing about where the deployment keeps them; they
now resolve against the working directory, which every unit sets.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-30 15:47:50 +02:00
rpotter6298 9a4ee8e0cf Flatten to a single package directory
The checkout is now astrape/astrape-oracle, not astrape/astrape-oracle/<package>. The package
contents move to the repository root and pyproject maps the package name to
'.' via package-dir, with the subpackages listed explicitly.

The systemd units move out to /srv/astrape/deploy/systemd, outside every
repository, because they describe this deployment rather than any one
component.

Verified both install modes: editable, which is how the deployment runs, and
a plain wheel install, which is what the container build does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-30 15:05:17 +02:00