Zero-Boilerplate Dashboards: Live Autologging for Keras and PyTorch with Visdom
Devcon 8 · 5 Nov 2026 · 13:16
Jayant Parashar, an open source contributor working on Visdom with FOSSASIA, presents autologging for Visdom, the live dashboard for machine learning training. Manual logging needed about 70 lines of code for a model of 10 to 12 lines, while the new loggers read values through each framework's own callback system, so a Keras, PyTorch or PyTorch Lightning logger streams loss and metrics with about one line. Cross-validation runs appear on a single comparison chart. Loggers also exist for XGBoost and scikit-learn, and a semi-automatic logger covers a framework with no internal logging API. Demo videos did not play.
Speakers
Topics
From Devcon 8, hosted by Ethereum Foundation.
Transcript
[music] my work in wisdom that's it that is the auto logingging feature that I have made in past few months and uh I'll start with the thing yeah so why uh we can't just watch in your terminal like if you have guys worked on machine learning model training has anyone worked or not like yeah so I can see a few of So if you guys have worked you guys uh see that when you train your model you get the training loss and validation loss or whatever the parameter you want on your terminal getting printed on every epoch like every data get trains and you get
the uh the training loss on how much it uh have the problem on like predicting the correct value like how much loss it have and to that uh you can watch in your terminal but can you tell on which step it starts? It's getting over overfitted like uh do you guys can tell me this are just an 8 epoch thing? Yeah, you can you you can't because it's just you need to look into this everything then put this into a formula and then look into that okay it's getting underfitted and for for if you have a cloud GPU like multiGPU system like you're training a large language model you can't do on one GPU you need
multiple GPU things and uh going to each GPU and looking into how much evocates work how much gradient it loss it's it's very hard to you know uh be with it to get understand how it's working or not so That's how why we need a logging. So prior my work uh wisdom has manual logging thing like you can log to wisdom but you have to write same thing again and again like uh uh for every metric you have to create a window then put the guard rails regarding that if there is no window it should create it. If there is a window then it should uh append to that window only. So it's just a same thing you are repeating for each value like loss function like uh validation loss like uh gradient compute and other
things. But uh uh when you train a machine learning model you also get multiple errors regarding like if you're training multiple models like cross validation models or something like that they have they have the same validation repeating upon how much value you have chosen for them. like for if you have a k value you they will repeat k and the each k will plot one uh one window so you don't know which is uh correct for you to use so uh that's the problem with manual logging and I have a video for you guys is it playing or what it's not I don't know why but yeah
Goodbye. Thank you. I think I'll move forward with it.
Yeah, leave it guys. So it was uh something that I want to show that manual logging on working how it's work like for example I give you the overview of the video. So in video I I was giving you an example like you have a model of 10 to 12 lines of model describing what features you want. But for that in the video there was 70 lines of code for logging the values because each metric that you want to log have another window their guardrails their system uh their uh uh their approach to plot the values. So for that uh we need better logging thing. So yeah now uh why we need an auto logging?
So as I have earlier told you that there are multiple guard things that uh need to be uh guarded before plotting the values. So and in the last uh slide uh I also showed you that the lines of code like for 12 lines of model you have to write 70 lines of code for the uh for the just logging the values. So that's why we need an auto logingging feature that for one line you can log all the model values to your wisdom uh dashboard and see how your model is performing or what. Now how auto logingging works? So to keep wisdom lightweight what we have done and gone through is that we go we gone through that every uh framework have their own callback system on how
they calculate the values. So they also share the values if you want through the API. So we have done that. So when you start the coding the logger calls the value from the uh uh from the uh framework like for PyTorch we have wisdom logger for lightning we have wisdom lightning logger so each calls through their values and then they just uh send it to the server and the browser plots it so you seize it. So to keep things simple we just copy the values we don't calculate anything to make it overheard for you.
Yeah. Now uh have anyone worked on wisdom uh sorry wisdom I'm PyTorch lightning anyone made any model related to pytorch lightning I didn't see much but yeah so pytorch lightning is a framework to create small experiment models like to see how the model will behave on large data set and to that uh we have made a logger to you so you can see the values related to how your model is performing how it's how it's uh getting the result on on the uh calculation of whatever uh neuron you have for optimizer or whatever it is. So that we have the
lightning logger and we have features related like for multiple GPU thing like you use data parallel. So data parallels keeps divide the data in parallel into multiple GPUs. Like if you have four GPUs, it will divide the data into four GPUs and then four GBs will run as a subprocess of the main process. To keep the values there, we have a rank zero safety there. So you can see your gradient changing on the GPU. Also we provide an experiment uh experiment uh API so that you can use any wisdom API to keep it work with it.
Uh here is an example like you define wisdom then you uh before starting your trainer you uh provide a logger and the logger in the logger uh arg you provide the wisdom lightning logger by providing also the wisdom server like your server details and when you start the and when you start the training detail it will plot the values related to that. This is just a simple uh log metric value for confusion metrics and heat maps. I'll just move forward.
Yeah. So this is also a video. I don't know why it's not playing but yeah. So in this video uh there was uh same loss functions getting and for that uh there was 13 lines of model code and just one line of logging values. So you write auto logging wisdom lightning logger and then pass the logger to the uh to the trainer of the pytor lightning and the values get loged when you start training the model. Similarly for tensorflow we have wisdom kas logger like tensorflow and kas are now together. Earlier tensorflow one is a part different different module and kas is a
different module. Now they both working in the same way. So for that we have kas logger. Kas logger works with tensorflow uh 2 and uh you can log their values there. So when you start training uh here you can see also like uh uh how your model is performing on validation and on the nor normal loss data you can compare them like a single chart would have the both values compared on a different uh different lights on how the change is uh performing.
Uh here is an example related to that. So you uh import uh wisdom kas logger from wisdom.logger. Every logger just imported from wisdom.loggers and you can import any logger. Like pytorch uh for pyarch you use wisdom logger. For kas you use wisdom kas. For lightning you use wisdom lightning logger. It's just the same value. So you pass a logger variable. And in the logger variable you pass the wisdom kas logger with whatever name you want with the viz uh with the viz server thing on where you want to plot the values and when you call the model.fit in uh tensorflow you pass the callbacks to loggers. Now uh you can say like I can work with the the manual
thing where that's what we have fixed in manual when manual have as you as I've already told you that uh the CV problem CV have multiple models. So multiple models get multiple windows. Now here what we have fixed it. It gives a chart so that uh the three models have a chart on which is performing greater on what parameter it is. So that's what we have fixed here. So you don't need to like look into five different different charts. You can look into one and then submit your model for the review or what. [clears throat] Yeah.
I think this is also a video. there's some internet problem that it's not working. So basically here also uh I have trained a CNN model on the cipher data set. I have used a GPU. So there is a GPU chart also. So when the uh model start training it's it shows the gradient changes and the uh the loss compare of the validation loss and the training loss. so that you can understand if if your model is underfitting or what like underfitting under overfitting or it's going smooth and well.
So uh what if you want something new like if you are using Zax like Zax is also a framework that is used to train machine learning models or deep learning models like for that that Zax doesn't provide us any uh internal API for loggings. So for that we have wisdom loggers. Wisdom logger is much like a semi-automatic uh logger. It's not totally auto logging values. You have to pass the uh loggers there uh with each value and then it will it will plot the values with the name you provide. So, so like earlier you are just passing one line now you have to write a line and then every time you pass a value you just call that logger.log log and then
the name of the uh the metric you have and then the pass the metric that you want to plot from there. Uh example is like you can see here uh here uh you start with vis wisdom logger you s and you pass the vis and the environment run and for epoch for epochs in range of epoch like how much epoch you have you get a loss metric equals to train epoch model and data loader and for every loss and uh evaluate is a function in in machine learning uh in machine learning frameworks that you can evaluate your model accuracy. So you just call t.log then the name of the metric you want to
plot on the graph then the metric value from where you want or like here we want loss so we just name it train loss and then pass the loss value. Same for the validation loss and then pass the evaluate model. So these were for the uh deep learning thing. How about if someone is on machine learning like Kaggle competitions have on machine learning. So machine learning also we have scikit learn and exe that are mostly used in in machine learning in machine learning competition and in machine learning work. So for that uh we have autolog API for uh sikit learnon and wisdom u wisdom xy boost logger. So when
you train model the pass the values from the run directly and uh show it on your browser. So uh that's all and I hope you guys uh try and contribute on uh wisdom just pip install python m wisdom. And it will start on your local host 1897 and you can contribute it contribute on foacia wisdom. Uh thank you guys. [music]
Related talks
- Set up Visdom and Watch Your LLM
- How to use Visdom to Visualize Ethereum and Blockchain Data
- ETH Evals: testing agents on Ethereum
- There's a Critical Bug in x402 markets: 1200 merchants in an unfair market
- See You in (Robot) Court: Justice in the Agent Economy
- Can Ethereum Give Citizens a Better Deal on Their Energy Data?
- Build a Starknet MCP Server in 15 Minutes - Connect Claude AI to Blockchain
- AI x Ethereum: where we are now
- Open + Decentralized AI
