Evaluate models using the evaluation/evaluate.py script to compute WQL and MASE values for in-domain or zero-shot benchmarks.
Running Evaluation
Use the --chronos-model-id to specify the model, --batch-size, --device, and --num-samples.
Aggregating Scores
You can use the following logic to compute aggregated relative WQL and MASE scores against a baseline using scipy.stats.gmean.
# In-domain evaluation
python evaluation/evaluate.py evaluation/configs/in-domain.yaml evaluation/results/chronos-t5-small-in-domain.csv \
--chronos-model-id "amazon/chronos-t5-small" \
--batch-size=32 \
--device=cuda:0 \
--num-samples 20
# Zero-shot evaluation
python evaluation/evaluate.py evaluation/configs/zero-shot.yaml evaluation/results/chronos-t5-small-zero-shot.csv \
--chronos-model-id "amazon/chronos-t5-small" \
--batch-size=32 \
--device=cuda:0 \
--num-samples 20
import pandas as pd
from scipy.stats import gmean
def agg_relative_score(model_df: pd.DataFrame, baseline_df: pd.DataFrame):
relative_score = model_df.drop("model", axis="columns") / baseline_df.drop(
"model", axis="columns"
)
return relative_score.agg(gmean)
result_df = pd.read_csv("evaluation/results/chronos-t5-small-in-domain.csv").set_index("dataset")
baseline_df = pd.read_csv("evaluation/results/seasonal-naive-in-domain.csv").set_index("dataset")
agg_score_df = agg_relative_score(result_df, baseline_df)