Using comments in code is a best practice on any development platform. It allows you to document what you did and why you did it. Comments can prove beneficial when you or another developer have to go back and review or change previous code. They quickly add context to a block of code reducing the need to go back and try and reverse engineer what was done. This same concept is applicable for Azure Machine Learning (Azure ML) experiments. Comments make your experiments easier to read and follow, and they can help save time when reviewing or debugging your model.
Azure ML makes it easy to add comments to an experiment by allowing you to put the comments directly on a module that has been placed on the canvas. To add a comment to a module, simply double-click the module on the canvas, type your comments in the editable text box that appears, and click anywhere on the canvas outside of the text box when done.
When looking at a data flow in an experiment, you can choose to show or hide comments on a module by clicking the down arrow to expand/show or the up arrow to collapse/hide.
It is not necessary to add a comment to every module in your experiment. For some modules, the what/why is very obvious (like the Train Model module). I find myself adding comments more to modules used in data prep steps, when executing R scripts, and when I project specific columns for use in a specific task.
Azure Machine Learning Quick Tips
This post is a part of a series of tips and best practices I've come across for using Azure Machine Learning. The series of posts is not intended to provide tips about general data science or machine learning processes, but rather ideas specific to using Azure ML as a tool for data science and machine learning.