I would not use the in-sample residuals ("training error") to calculate weights, because that would reward overfitting models.
Instead, I would divide the historical data into two batches, for instance the first 80% and the second 20%. Fit your two models to the first 80%. Forecast both out into the last 20%. Use the out-of-sample errors here to calculate weights. Finally, refit your two models on the entire historical sample, but do not update your weights. Then your weights will be based on a holdout sample, but your models will be trained using all data.
Did I write "finally"? I shouldn't have. Finally, be sure to read Claeskens et al., "The forecast combination puzzle: A simple theoretical explanation" (2016, IJF). The "forecast combination puzzle" they refer to is the possibly surprising effect that unweighted combinations often outperform "optimal" combination weights. One possible explanation is that the process of estimating (!) "optimal" weights will introduce its own variance, which will of course carry through to the variance of your forecasts, and therefore your forecast errors.
Thus, whatever you do, you should compare the approach you choose to simple unweighted combinations.
If you want to get fancy, there are a couple more articles on forecast combination in the IJF.