ALAE metrics
Use this sub-skill when a user asks how to evaluate ALAE/StyleALAE with FID, reconstruction FID, PPL, or LPIPS, or when they need to decide whether a legacy metric run is ready, too expensive, or blocked by dependencies.
Routing contract
- Use
references/metrics-workflows.mdfor commands, required artifacts, metric outputs, sample-count costs, and config caveats. - Use
references/troubleshooting.mdfor TensorFlow/dnnlib, metric pickle, CUDA/cuDNN, checkpoint, TFRecord, and stale-script failures. - Run
scripts/check_metrics_stack.pybefore recommending a native metric run. The checker is safe: it does not importmetrics/*.py, does not download files, and does not run evaluation. - Route TFRecord creation, raw dataset conversion, and sample-image layout questions to
../data-preparation/SKILL.md. - Route checkpoint download, pretrained artifact readiness, generation, reconstruction, or style-mixing asset questions to
../generation/SKILL.mdor the root setup guidance. - Route training launch, checkpoint semantics, or architecture/checkpoint compatibility questions to
../training/SKILL.md.
Non-negotiable safety notes
- Do not import
metrics/fid.py,metrics/fid_rec.py,metrics/ppl.py, ormetrics/lpips.pymerely to inspect them. Their top-level module code initializes the legacy TensorFlow/dnnlib stack and calls a metric pickle download helper. - Treat metrics as optional legacy workflows. The inspected environment proved TensorFlow 1.15-style APIs and
dnnlib.tflibimports, but TensorFlow GPU libraries for the old CUDA/cuDNN stack were missing or unverified. - Do not run bundled full metric evaluations. Native metric scripts process 10k to 50k samples and require explicit user approval, local data, checkpoints, metric pickle files, CUDA, and the legacy TensorFlow/dnnlib stack.
- Do not route
metrics/fid_sep.pyas executable. It depends on the absent separate-model implementation and a missing separate-model default config.
Default operating sequence
- Confirm the user has a checkout root and intends to run an expensive optional metric, not just inspect readiness.
- From the ALAE repository root, ensure
PYTHONPATHincludes the checkout root before running native repository scripts. - From this sub-skill directory (or by using the generated skill's script path), run the safe stack checker with an explicit config name or path, for example
python scripts/check_metrics_stack.py --repo-root <ALAE-checkout> --config ffhq. - If the checker reports missing TensorFlow 1.x APIs,
dnnlib, metric pickle files, a checkpoint pointer, CUDA visibility, or required TFRecords, resolve those first through the routed sub-skills. - Only then present the native metric command and its expected output file or stdout result from
references/metrics-workflows.md.