from labml import analytics

Load runs

You can load runs with runs().

We are analysing some sample projects: * Predicting the stock price of next 5 minutes * Counterfactual Regret Minimization with Kuhn Poker,

stocks = analytics.runs('d76d3922a8a211eaa7a2857d91b0cff2')
kuhn = analytics.runs('90a456ee9b1c11eaaf7bf218981c2492')

dir gives all the available indicators and artifacts for the run(s).


Distribution plot

distribution() plots the distribution of given set of indicators. Multiple indicators can be merged with +.

The plots are rendered with Altair. The smaller minimap below the main plot can be used to zoom in.

We are setting a smaller width to fit-in to the Read The Docs theme

analytics.distribution(stocks.valid_loss + stocks.train_loss,
                       width=400, height=300, height_minimap=50)
analytics.distribution(kuhn.average_strategy_Q_b + kuhn.average_strategy_Kb_b +
                       kuhn.strategy_Q_b + kuhn.strategy_Kb_b,
                       width=400, height=300, height_minimap=50)

Scatter plot

The below chart plots indicators on a scatter plot.

analytics.scatter(kuhn.average_strategy_Q_b, kuhn.average_strategy_Kb_b,
                  width=400, height=400)

Loading artifacts

You can also load up artifacts saved during training and analyse them.

series, names = analytics.artifact_data((stocks.valid_output + stocks.valid_target))
predictions, target = series
last_prediction = predictions[-1][1]
analytics.scatter([last_prediction.ravel()], target.ravel(),
                  height=400, width=400)