Hi again,
You are correct that I shouldn’t have been trying to fit to the test data, but I just wanted to mention that there are definitely instances when one would want to transform both feature and target variables.
Depending on data distributions (and stochastic variability of natural phenomena), transforming both features and targets can improve stability and help reduce gradient sizes (faster/more stable convergence).
Regardless, your questions and suggestions allowed me to get the code working exactly as I’d intended, so a BIG THANK YOU!!!
I ended up applying the data fitting within the getitem method, as follows:
    def __getitem__(self, index):
        if self.train is True:
            self.transform.fit(self.train_X)
            X_data = self.train_X[index]
            if self.transform is not None:
                X_data = self.transform(X_data)
        
        if self.train is True:
            self.transform.fit(self.train_Y)
            Y_data = self.train_Y[index]
            if self.transform is not None:
                Y_data = self.transform(Y_data)
            return X_data, Y_data

        else:
            self.transform.fit(self.train_X)
            X_data = self.test_X[index]
            if self.transform is not None:
                X_data = self.transform(X_data)
            return X_data

This was my first time posting on a coding site/forum, and you’ve made it a positive experience for me - much appreciated!
Thanks again and cheers