Hello! I have a question about logging metrics from scvi-tools. I am trying to create a model in Pyro based on the scvi-tools-skeleton, and I am wondering what is the “correct” way to log a metric?
For example, I compute a particular log probability in my Pyro “model()” as a regularization, and I want to log that as a metric. What’s the best way?
It seems like
self.log("name", tensor) is only callable from a
LightningModule, if I am understanding correctly. The Pyro module itself (from scvi-tools-skeleton) is a
PyroBaseModuleClass, which does not seem to be a
LightningModule, so I don’t think I can directly insert a
self.log("name", tensor) statement into my Pyro “model()”.
Thanks so much! What a great codebase for the community!