Plotting the wGAN Discriminator and Generator loss

What would be the most efficient way to convert each line from the WGAN training code to a tensorboard-like setup to plot the Discriminator and Generator Loss?

Maybe I didnt understand this fully, but I noticed that the uploaded notebook as well as the lecture did not mention about the convergence criterion. Is there any heuristic for training a WGAN on our own custom dataset? say, the
number of samples, the number of epochs etc?

Loss_D [-0.52031]; Loss_G [0.32257]; D_real [-0.34698]; Loss_D_fake [0.17333]