I am using pl datamodules and am aware of a couple data hooks available the model class, for example “model.train_dataloader()”, and although this helps with calculating quantities such as total training steps by looking at the length of the datamodule’s train_dataloader(), I often would like to access other datamodule attributes from my model at other points of the training / evaluation pipelines.
I saw there is a “datamodule” attribute in the model which does not seem to get initialized with anything, but I haven’t understood if this is a recommended way to accomplish what I am trying to do, (access arbitrary datamodule attributes from my model at arbitrary stages in the training / evaluation pipelines), or if that datamodule attribute of the model is intended for some other use?