CastFactory is a recipe-centric research framework for LLM-driven time series forecasting. The current implementation provides the early framework scaffold for leakage-safe data handling, representation adapters, forecast parsing, evaluation, trace artifacts, and verifiable rewards.
Implemented foundation modules:
castfactory.core: recipe loading, experiment shell, and registriescastfactory.data:TSRecord,ForecastSample, CSV reader, timestamp split, window builder, scaler, leakage checkscastfactory.representation: statistics, context, textual summary, and hybrid representationscastfactory.parsers: JSON and array forecast parsers with fallback behaviorcastfactory.evaluation: point metrics and standard evaluatorcastfactory.trace: run artifact storecastfactory.rewards: accuracy, format, and composite rewardscastfactory.training: SFT dataset formatter, trainer shell, and optional Transformers backend
The architecture plan is in docs/CastFactory_Library_Architecture.md.
python3 -m unittest discover -s tests -v
PYTHONPYCACHEPREFIX=/tmp/castfactory_pycache python3 -m compileall castfactory
python3 -m castfactory.cli.run /tmp/castfactory_cli_recipe.yamlOptional dev tooling is declared in pyproject.toml:
python -m pip install -e ".[dev]"
python -m pytest tests -q
python -m ruff check castfactory testsOptional training stacks:
python -m pip install -e ".[hf]"
python -m pip install -e ".[train]"