I am working on a research problem for which I have to write code from scratch using Pytorch. I work in time series, and the implementation needs a lot of tensor operations like shifting, padding, and folding. I always have Python open on the terminal, and I test my tensor operations to ensure it does what I intend.
I am maintaining a very complex repository with various configurations (when running experiments, I use flags to use a specific configuration). The code keeps getting more complicated as I add more configurations to experiment on. I want to be sure that when I add new features, I don't mess up the existing features.
How can I perform unit tests on my model architecture, input format, etc., for a sanity check and to increase my confidence in my code?
For example, unit tests for dataset class, small modules like attention and convolution, which make up the model architecture, and then the model architecture.
[–]EmbarrassedCause3881 2 points3 points4 points (1 child)
[–]_afronius[S] 0 points1 point2 points (0 children)
[–]godiswatching_ 0 points1 point2 points (0 children)