Files
SkillCompiler/scripts/static_compile/profile_generation/model_preference/paths.py
T
2026-09-04 14:58:42 +08:00

37 lines
1.2 KiB
Python

"""Canonical paths for the integrated behavioral-fingerprinting component."""
from __future__ import annotations
from pathlib import Path
from ...paths import PROFILE_RESULTS_ROOT, PROJECT_ROOT, model_profile_path
SOURCE_DIR = Path(__file__).resolve().parent
WORKSPACE_ROOT = PROJECT_ROOT
INPUT_DATA_ROOT = WORKSPACE_ROOT / "data" / "model-preference" / "behavioral-fingerprinting"
PROMPTS_DIR = INPUT_DATA_ROOT / "AI-comm-records"
# All generated artifacts live together, separate from immutable input data.
OUTPUT_ROOT = PROFILE_RESULTS_ROOT / "model-preference" / "behavioral-fingerprinting"
RESULTS_DIR = OUTPUT_ROOT / "responses"
EVALUATIONS_DIR = OUTPUT_ROOT / "evaluations"
ARTIFACTS_DIR = OUTPUT_ROOT / "artifacts"
CHARTS_DIR = ARTIFACTS_DIR / "charts"
REPORTS_DIR = ARTIFACTS_DIR / "reports"
# Canonical Profile JSON files sit directly below model-preference by model.
PROFILES_DIR = PROFILE_RESULTS_ROOT / "model-preference"
def workspace_relative(path: Path) -> str | None:
"""Return a stable workspace-relative path for an existing artifact."""
if not path.exists():
return None
try:
return str(path.relative_to(WORKSPACE_ROOT))
except ValueError:
return str(path)