from pathlib import Path import sys,numpy as np,matplotlib;matplotlib.use('Agg');import matplotlib.pyplot as plt;R=Path(__file__).resolve().parents[1];sys.path.insert(0,str(R));from model.nncam_stable import * c=cfg(R);d=np.load(R/c['paths']['predictions']);rmse=float(np.sqrt(np.mean((d['prediction']-d['target'])**2)));write(R/c['paths']['evaluation'],{'rmse':rmse});plt.plot(d['prediction'][0]);p=R/c['paths']['figure'];p.parent.mkdir(parents=True,exist_ok=True);plt.savefig(p);print(p)