File size: 579 Bytes
3d2162d
bc61241
350cc95
ed82405
28a91ce
2fbc388
850c04b
725b6f2
83f1fd9
bb18a30
f3aa86c
d2eb2c0
724ffea
043db65
03c17f9
9008f44
9afe6e8
66b26f5
708802e
c398d56
47e276a
4c54605
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import dagshub
import yaml

from src.models.model import Summarization
import pandas as pd


def evaluate_model():
    """
    Evaluate model using rouge measure
    """
    with open("params.yml") as f:
        params = yaml.safe_load(f)

    test_df = pd.load_csv('data/processed/test.csv')
    model = Summarization()
    model.load_model(model_type=params['model_type'], model_dir=params['model_dir'])
    results = model.evaluate(test_df=test_df, metrics=params['metric'])

    with dagshub.dagshub_logger() as logger:
        logger.log_metrics(results)
    return results