stringforge.vulcan.Vulcan#
- class stringforge.vulcan.Vulcan(*, repo, staging_dir=None, run_id_template='{date}_{project}_h11-{h11?}_h12-{h12?}_ks-{ks_id?}_triang-{triang_id?}_seed-{seed?}', project='', token=None, budget=90, window_s=3600.0, extra_kwargs=None)#
Bases:
objectPer-repo handle for the production vacuum-forging pipeline.
A
Vulcaninstance is bound to a single HuggingFace repo and a single local staging directory. Workers callwrite()to stage validated shards; a head node (cron job, daemon, orpython -m stringforge.vulcan sync) callssync()to push them to the Hub. MultipleVulcaninstances may co-exist in the same process to write to different repos – useful for cross-project workflows where different paper drafts target different production repos.See
stringforge.vacua_writer.VacuaWriterfor the curated counterpart that targets the paper-alignedvacua_vaultrepo.- Parameters:
repo (
str) –"user/repo"on HuggingFace. Required; no global default. Override per-call viasync()withrepo=....staging_dir (
Union[str,Path,None]) – Local staging root. Resolution order is documented inresolve_staging_dir().run_id_template (
Union[str,Callable[...,str],None]) – Either a format string with{name}/{name?}placeholders, a callable returning the run_id, orNonefor the UUID fallback. Seerunid.project (
str) – Default{project}value for the run-id template.token (
Optional[str]) – HuggingFace write token. Falls back toSTRINGFORGE_VULCAN_TOKENthenHF_TOKENat sync time.budget (
int) – Commits-per-hour ceiling. Defaults to 90 (10-commit margin below HuggingFace’s 100/hour cap).window_s (
float) – Rolling-window length, in seconds, over whichbudgetapplies. Defaults to 3600 s.extra_kwargs (
Optional[Mapping[str,Any]]) – Default substitutions for the run-id template applied to everywrite()call. Per-callextra_kwargs=arguments take precedence.
- Raises:
ValueError – When
repois empty.
See the module page for the curated public method index. The class page is kept as the canonical object target for cross-references and the general index.