"""Filesystem layout shared by every step of the recipe. The scripts read and write files at the locations defined here, so the four numbered steps chain together against this package's own folders. Every path can be overridden with an environment variable if you want a different workspace. base/ step 0 downloads the base model here (google/functiongemma-270m-it) data/ step 1 writes train.jsonl / val.jsonl here work/ step 2 keeps the LoRA adapter + training log here model/ step 3 writes the merged model here (this package ships it) onnx/ step 4 writes the Sentis-ready graph here (this package ships it) The developer+tools prefix (fg_dev_block_home.txt) is written into model/ next to the weights it is paired with — the Unity runtime loads the two together. """ import os _HERE = os.path.dirname(os.path.abspath(__file__)) ROOT = os.environ.get("FG_ROOT", os.path.dirname(_HERE)) # package root (parent of scripts/) BASE_MODEL = os.environ.get("FG_BASE", os.path.join(ROOT, "base")) DATA_DIR = os.environ.get("FG_DATA", os.path.join(ROOT, "data")) WORK_DIR = os.environ.get("FG_WORK", os.path.join(ROOT, "work")) MODEL_DIR = os.environ.get("FG_MODEL", os.path.join(ROOT, "model")) ONNX_DIR = os.environ.get("FG_ONNX", os.path.join(ROOT, "onnx")) # derived file paths TRAIN_JSONL = os.path.join(DATA_DIR, "train.jsonl") VAL_JSONL = os.path.join(DATA_DIR, "val.jsonl") DEV_BLOCK = os.path.join(MODEL_DIR, "fg_dev_block_home.txt") LORA_DIR = os.path.join(WORK_DIR, "lora_best") TRAIN_LOG = os.path.join(WORK_DIR, "train.log") ONNX_FILE = os.path.join(ONNX_DIR, "functiongemma_home.onnx") # Optional: step 4 also copies the exported graph into a Unity project when this # points at a destination .onnx path. Leave unset to skip the copy. UNITY_ASSET = os.environ.get("FG_UNITY_ASSET", "")