Spaces:
Runtime error
Runtime error
File size: 726 Bytes
1336f19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | import json
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if BASE_DIR not in sys.path:
sys.path.insert(0, BASE_DIR)
def main():
artifact_dir = os.path.join(os.path.dirname(__file__), "ensemble_artifacts")
metadata_path = os.path.join(artifact_dir, "metadata.json")
if not os.path.exists(metadata_path):
print("No trained ensemble artifacts found. Run ml_models/train_ensemble.py first.")
return
with open(metadata_path, "r", encoding="utf-8") as handle:
metadata = json.load(handle)
print("Loaded ensemble metadata.")
print(json.dumps(metadata.get("reports", {}), indent=2)[:6000])
if __name__ == "__main__":
main()
|