Closed IlterOnatKorkmaz closed 1 year ago
There was a small typo in our error handling (I'm putting up a PR now). This is the error that you should have seen:
NotImplementedError: No fantasy model support for IndependentMultitaskVariationalStrategy. Only VariationalStrategy and UnwhitenedVariationalStrategy are currently supported.
My use-case necessitates setting new training data for the Gaussian process to condition on, without refitting the model parameters. I understand that ExactGP models have the set_train_data method which suits this purpose perfectly, but ApproximateGP does not seem to have a similar functionality. To work around this, I attempted to use the get_fantasy_model method, hoping to generate a new model conditioned on both the existing and new data.
Currently we don't support this for IndependentMultitaskVariationalStrategy, though in theory it shouldn't be too hard to set up (it would essentially just require calling through to the base variational strategy). We'd accept a PR if you'd be up to implementing it!
🐛 Bug
Hello GPyTorch team,
I am currently working on a project that requires using Gaussian processes to handle multi-task regression. I am using your ApproximateGP model with IndependentMultitaskVariationalStrategy, as shown in your SVGP Multitask GP Regression example. However, I've run into an issue when trying to update the model with new training data.
My use-case necessitates setting new training data for the Gaussian process to condition on, without refitting the model parameters. I understand that ExactGP models have the set_train_data method which suits this purpose perfectly, but ApproximateGP does not seem to have a similar functionality. To work around this, I attempted to use the get_fantasy_model method, hoping to generate a new model conditioned on both the existing and new data.
Unfortunately, when I attempted to use get_fantasy_model with my ApproximateGP model (initialized with IndependentMultitaskVariationalStrategy), I encountered an AttributeError indicating that the IndependentMultitaskVariationalStrategy object does not have an attribute name. It appears that get_fantasy_model is not fully compatible with IndependentMultitaskVariationalStrategy, or perhaps with ApproximateGP models in general.
Given this situation, I'd appreciate if you could provide some guidance or potential workarounds. Furthermore, would you consider adding a functionality similar to set_train_data for ApproximateGP models, or possibly extending the compatibility of get_fantasy_model to handle ApproximateGP and IndependentMultitaskVariationalStrategy? I believe these additions would make GPyTorch more flexible in handling a wider range of use-cases involving variational and multitask GPs.
Thanks for your time and your continuous work on this great library.
Best regards, İlter Onat Korkmaz
To reproduce
Code snippet to reproduce
Stack trace/error message
Expected Behavior
The code returns an ExactGP model as the fantasy model.
System information
Please complete the following information:
Additional context
None