Skip to content

[ASK] Evaluation logging #560

@juliobguedes

Description

@juliobguedes

Description

I am just beginning to use Cornac and, while it is nice to have a module that contains everything from data loading to model training and evaluation, I often find myself lost regarding the progress of my execution. For example, I have a script very similar to the Quickstart example, and I am using a dataset similar in size and characteristics to the ML25M to train a BPR and a WMF model. Their maximum iterations are set to 100, and the verbose is True – I want to know where I am at. However, after the model is trained, there is no logging regarding the evaluation, and it takes a huge amount of time without any output.

A snippet of my code:

ss = StratifiedSplit(
    data=data,
    chrono=True,
    fmt="UIRT",
    test_size=0.2,
    rating_threshold=4.0,
    seed=RANDOM_SEED,
)

mf = MF(
    k=EMBEDDING_DIM,
    max_iter=100,
    learning_rate=0.01,
    lambda_reg=0.02,
    use_bias=True,
    seed=RANDOM_SEED,
    verbose=True,
)
wmf = WMF(
    k=EMBEDDING_DIM,
    max_iter=100,
    learning_rate=0.001,
    seed=RANDOM_SEED,
    verbose=True,
)

models = [mf, wmf]

metrics = [
    MAE(),
    RMSE(),
    Precision(k=10),
    Precision(k=20),
    Precision(k=50),
    Recall(k=10),
    Recall(k=20),
    Recall(k=50),
    NDCG(k=10),
    NDCG(k=20),
    NDCG(k=50),
    AUC(),
    MAP(),
]

cornac.Experiment(eval_method=ss, models=models, metrics=metrics, user_based=True, verbose=True).run()

The output after 8h running:

100%|██████████████████████████████████| 100/100 [03:18<00:00,  1.99s/it, loss=2152119.50]
Optimization finished!

It takes 3 minutes to train the model, but after that, in 8 hours, all I can see is my CPU being used. How I am supposed to know the ETA and if it's working correctly?

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions