How to live log arbitrary line graph

I’m running active learning experiments where the result is some model performance metric against dataset size. I’ve seen the below code example:

data = [[x, y] for (x, y) in zip(x_values, y_values)]
table = wandb.Table(data=data, columns = ["x", "y"])
wandb.log({"my_custom_plot_id" : wandb.plot.line(table,
                                 "x", "y", title="Custom Y vs X Line Plot")})

but this seems to be for static graph generation once you have access to all the data.

How do I generate a live updating graph of model performance against dataset size?

Hi @georgepearsebehold,

Just to make sure I understand you correctly, are you trying to log a line of values at each timestep and want to see the progression of this line over time?

Thanks,
Ramit

I wanted to log a line of values against a self defined x axis.

I’ve since resolved with :

wandb.define_metric("dataset_size")
wandb.define_metric("val/ AUC SLC (max)", step_metric="dataset_size")
log_dict = {
    'dataset_size': len(baal_data_module.active_set),
    'val/ AUC SLC (max)': max_val_auc
}
wandb.log(log_dict)

Ah, understood. define_metric is definitely the right way to go about this. Glad you were able to resolve this by yourself!

Thanks,
Ramit

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.