Repository navigation
Conversation
Code Coverage SummaryResults for commit: 78d1e4a Minimum allowed coverage is ♻️ This comment has been updated with latest results |
|
Only linting is failing, should be a quick fix |
GiovanniCanali
left a comment
There was a problem hiding this comment.
Looks good!
Currently, we can only monitor the inputs and outputs of a model's forward pass through the logging implemented in labelize_forward. What happens when we use plain tensors instead?
Is there a central point where we could add logging to monitor these as well? I was considering the forward method in the single/multi/ensemble model mixins.
I don't think this is possible actually in an easy way. The only way I see is to overload the forward method as in labelize. Or to build a forward hook |
Why not? It should be the same exact command used in the def forward(self, x):
"""
The forward pass implementation for the single model, which simply
evaluates the model on the input.
:param x: The input data.
:type x: torch.Tensor | LabelTensor | Data | Graph
:return: The output of the single model.
:rtype: torch.Tensor | LabelTensor | Data | Graph
"""
logger.debug(
"sover.forward: inputs=%s, outputs=%s.",
input_variables,
output_variables,
)
return self.model(x) |
Description
Adds a small, library-safe logging layer to PINA. Importing
pinaremainssilent by default; users opt in when they need diagnostics.
Checklist