Logging Time Series with W&B
Sample workflows and comparisons of model predictions for time series data.
Created on May 10|Last edited on February 6
Comment
TL;DR prototype the basics of visualizing and modeling time series data in W&B
Given a time series dataset of weather measurements (temperature, wind speed, humidity, etc), I follow this excellent TensorFlow tutorial to forecast future measurements with some simple neural networks (linear, convolutional, and recurrent) and compare their performance.
Try the interactive colab →
Toggle true and predicted line series via PanelPlot
Create a PanelPlot for every subsequence of interest (window of validation data/named Table). You can visually compare model predictions to each other and to the ground truth by toggling each run on/off independently (checking the box for each run name).
runs.summary["val_samples_2"].merge({}).table({"tableState":{"autoColumns":false,"columns":{"col-td9lmxaqq":{"panelId":""},"col-4clhib6al":{"panelId":""},"col-7j6u036vr":{"panelId":""},"col-lfia9wcyp":{"panelId":""},"col-gdfxgkwgi":{"panelId":"","panelConfig":{}},"col-jtbusvaao":{"panelId":"","panelConfig":{}},"col-g4nw0ckcs":{"panelId":"","panelConfig":{}}},"columnNames":{"col-td9lmxaqq":"","col-4clhib6al":"","col-7j6u036vr":"","col-lfia9wcyp":"","col-gdfxgkwgi":"","col-jtbusvaao":"","col-g4nw0ckcs":"time"},"preFilterFunction":{"nodeType":"void","type":"invalid"},"columnSelectFunctions":{"col-td9lmxaqq":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"time step"}}}},"col-4clhib6al":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"timestamp"}}}},"col-gdfxgkwgi":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":"run"},"fromOp":{"name":"tag-run","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"}}}},"col-jtbusvaao":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":"string"},"fromOp":{"name":"run-name","inputs":{"run":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":"run"},"fromOp":{"name":"tag-run","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"}}}}}}},"col-g4nw0ckcs":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"timestamp","unit":"ms"}},"fromOp":{"name":"number-toTimestamp","inputs":{"val":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"timestamp"}}}}}}},"col-7j6u036vr":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"string"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"time_str"}}}},"col-lfia9wcyp":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"T (degC)"}}}}},"order":["col-td9lmxaqq","col-4clhib6al","col-gdfxgkwgi","col-jtbusvaao","col-g4nw0ckcs","col-7j6u036vr","col-lfia9wcyp"],"groupBy":[],"sort":[],"pageSize":10,"page":0},"tableStateInputType":{"type":"list","objectType":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"minLength":0},"table":{"autoColumns":false,"columns":{"col-9p6zm2v6h":{"panelId":""},"col-l1uo2ls39":{"panelId":""},"col-4lvo25fd7":{"panelId":""},"col-o3qmtn6kw":{"panelId":""},"col-gi5ehgval":{"panelId":""}},"columnNames":{"col-9p6zm2v6h":"","col-l1uo2ls39":"","col-4lvo25fd7":"","col-o3qmtn6kw":"","col-gi5ehgval":""},"preFilterFunction":{"nodeType":"void","type":"invalid"},"columnSelectFunctions":{"col-9p6zm2v6h":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"timestamp","unit":"ms"}},"fromOp":{"name":"number-toTimestamp","inputs":{"val":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"timestamp"}}}}}}},"col-l1uo2ls39":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"T (degC)"}}}},"col-4lvo25fd7":{"nodeType":"void","type":"invalid"},"col-o3qmtn6kw":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":"run"},"fromOp":{"name":"tag-run","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"}}}},"col-gi5ehgval":{"nodeType":"void","type":"invalid"}},"order":["col-9p6zm2v6h","col-l1uo2ls39","col-4lvo25fd7","col-o3qmtn6kw","col-gi5ehgval"],"groupBy":[],"sort":[],"pageSize":10,"page":0},"dims":{"x":"col-9p6zm2v6h","y":"col-l1uo2ls39","color":"col-4lvo25fd7","label":"col-o3qmtn6kw","tooltip":"col-gi5ehgval"},"axisSettings":{"x":{},"y":{}},"legendSettings":{"color":{}},"mark":"line"})
runs.summary["val_samples_0"].merge({}).table({"tableState":{"autoColumns":false,"columns":{"col-4c23tppiq":{"panelId":""},"col-f74ynpeay":{"panelId":""},"col-eyiyectbk":{"panelId":""},"col-akudy8ihn":{"panelId":""},"col-7qjajovbj":{"panelId":"","panelConfig":{}},"col-mch9y25zr":{"panelId":"","panelConfig":{}},"col-pn2ymm1nc":{"panelId":"","panelConfig":{}}},"columnNames":{"col-4c23tppiq":"","col-f74ynpeay":"","col-eyiyectbk":"","col-akudy8ihn":"","col-7qjajovbj":"","col-mch9y25zr":"","col-pn2ymm1nc":"time"},"preFilterFunction":{"nodeType":"void","type":"invalid"},"columnSelectFunctions":{"col-4c23tppiq":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"time step"}}}},"col-f74ynpeay":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"timestamp"}}}},"col-7qjajovbj":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":"run"},"fromOp":{"name":"tag-run","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"}}}},"col-mch9y25zr":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":"string"},"fromOp":{"name":"run-name","inputs":{"run":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":"run"},"fromOp":{"name":"tag-run","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"}}}}}}},"col-pn2ymm1nc":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"timestamp","unit":"ms"}},"fromOp":{"name":"number-toTimestamp","inputs":{"val":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"timestamp"}}}}}}},"col-eyiyectbk":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"string"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"time_str"}}}},"col-akudy8ihn":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"T (degC)"}}}}},"order":["col-4c23tppiq","col-f74ynpeay","col-7qjajovbj","col-mch9y25zr","col-pn2ymm1nc","col-eyiyectbk","col-akudy8ihn"],"groupBy":[],"sort":[],"pageSize":10,"page":0},"tableStateInputType":{"type":"list","objectType":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"minLength":0},"table":{"autoColumns":false,"columns":{"col-wxotb1kci":{"panelId":""},"col-ggje64v64":{"panelId":""},"col-vc5liavi4":{"panelId":""},"col-1vxjttis1":{"panelId":""},"col-sm1z2vdk1":{"panelId":""}},"columnNames":{"col-wxotb1kci":"","col-ggje64v64":"","col-vc5liavi4":"","col-1vxjttis1":"","col-sm1z2vdk1":""},"preFilterFunction":{"nodeType":"void","type":"invalid"},"columnSelectFunctions":{"col-wxotb1kci":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"timestamp","unit":"ms"}},"fromOp":{"name":"number-toTimestamp","inputs":{"val":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"timestamp"}}}}}}},"col-ggje64v64":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":"number"},"fromOp":{"name":"pick","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"},"key":{"nodeType":"const","type":"string","val":"T (degC)"}}}},"col-vc5liavi4":{"nodeType":"void","type":"invalid"},"col-1vxjttis1":{"nodeType":"output","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":"run"},"fromOp":{"name":"tag-run","inputs":{"obj":{"nodeType":"var","type":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"tagged","tag":{"type":"typedDict","propertyTypes":{"entityName":"string","projectName":"string"}},"value":{"type":"typedDict","propertyTypes":{"project":"project","filter":"string","order":"string"}}},"value":{"type":"typedDict","propertyTypes":{"run":"run"}}},"value":{"type":"typedDict","propertyTypes":{"file":{"type":"file","extension":"json","wbObjectType":{"type":"table","columnTypes":{}}}}}},"value":{"type":"typedDict","propertyTypes":{"table":{"type":"union","members":["none",{"type":"table","columnTypes":{}}]}}}},"value":{"type":"typedDict","propertyTypes":{"time step":"number","timestamp":"number","time_str":"string","T (degC)":"number"}}},"varName":"row"}}}},"col-sm1z2vdk1":{"nodeType":"void","type":"invalid"}},"order":["col-wxotb1kci","col-ggje64v64","col-vc5liavi4","col-1vxjttis1","col-sm1z2vdk1"],"groupBy":[],"sort":[],"pageSize":10,"page":0},"dims":{"x":"col-wxotb1kci","y":"col-ggje64v64","color":"col-vc5liavi4","label":"col-1vxjttis1","tooltip":"col-sm1z2vdk1"},"axisSettings":{"x":{},"y":{}},"legendSettings":{"color":{}},"mark":"line"})
Ground truth
1
Baseline
1
Linear
1
Dense 64-64
1
1
1
1
1
Logging time series data
To visualize time series data via wandb.Table, there are several options:
Log a Pandas DataFrame directly
This is the easiest path—use it when exploring your dataset and understanding features.
wandb.log({"timeseries_data" : wandb.Table(dataframe=data_df)})
Log rows of data and explicit columns
This format is more precise to select the columns you care about and time stamps in the correct format.
data_with_time = [[data[i], timestamps[i]] for i in range(len(data))]wandb.log({"timeseries_data" : wandb.Table(data=data_with_time,columns=["temperature", "time"])})
Log human-readable timestamps
Log the numerical timestamp as Python datetime.timestamp()—this can be converted to a human-readable timestamp from the Table/PanelPlot UI by appending .toTimestamp()
Detailed view with loss curves
Time series models
8
Flexible evaluation across data windows
Comparing a few hyperparameter settings for a toy CNN. For these training and evaluation runs, the model reads in three time steps at a time.
Convolutional models
5
Workflow setup and recommendations
Time series data is easier to visualize, organize, and understand in W&B with the following workflow steps:
Save cleanest data as Artifact; load with custom function
Starting with the initial raw data, explore and clean up the features—e.g. change the format, fill in missing values, normalize—as much as possible before versioning the cleanest possible data as an Artifact.
You might log the whole dataframe as one Table:
wandb.log({"raw_data" : wandb.Table(dataframe=data_df)
or choose to fix a split into train/val/test (expand for code sample)
Set up fixed, named windows of validation data
To precisely compare model performance, designate a few specific windows—timestamped sequences of consecutive data points—as validation data. Log these as named wandb.Tables—e.g. I use "val_samples_0", "val_samples_1", "val_samples_2"... as my Table names. By keeping the name constant, I can guarantee that I am comparing the forecasts of different models on the same input data.
Log multiple formats: step index, timestamp, and human-readable
I found three formats for managing time stamps useful for different purposes
- time step index: literally log the index of the input time step—this will be offset relative to any data window you've defined, so if your model reads in a sliding window of 3 data points, the first time step would be at index 3 and not 0.
- timestamp: log the numerical timestamp as Python datetime.timestamp()—this can be converted to a human-readable timestamp from the Table/PanelPlot UI by appending .toTimestamp()
- human-readable timestamp: log the string version of the timestamp which you would like readers to see
Log ground truth as a wandb.Table in a distinct run
To compare model performance against the ground truth, log the ground truth values for each named window as a separate wandb.Table—e.g. I use a distinct run named "ground_truth" to log all the labels (five Tables of validation data).
Add a comment
Created with ❤️ on Weights & Biases.
https://wandb.ai/stacey/time_s/reports/Logging-Time-Series-with-W-B--VmlldzoxOTg0Njc5