Closed yanniklockner closed 1 year ago
@mpolson64 could you please take a look at this? Seems like there are some fixes on our end needed here.
Sorry this has taken me some time to get back to. This is indeed a bug on our end -- thank you for finding it! I've put up a fix in the attached PR and it should be available in the next maintenance release which I'm hoping to get out this week. I will update you in this Issue when the fix is live.
This is fixed as of https://github.com/facebook/Ax/releases/tag/0.3.2 -- closing the task.
Hey guys,
thank you guys a lot for the providing Ax. I am only getting started to work with the package, but already love the thought you put into it! Currently, I am targeting a multiobjective manufacturing problem, for which I'd like to use
MOO_MODULAR
from the modelregistry. I saw that in #1459 you removed it from the registry, arguing equal function withBOTORCH_MODULAR
. Specifically, using the Service API, and callingax_client.get_pareto_optimal_parameters()
, the code crashes with the following traceback:Traceback (most recent call last): File "foo.py", line 83, in initBayesOpt best_parameters, values = ax_client.get_pareto_optimal_parameters() File "someone\Python3.9.4\lib\site-packages\ax\service\ax_client.py", line 1498, in get_pareto_optimal_parameters return self._get_pareto_optimal_parameters( File "someone\Python3.9.4\lib\site-packages\ax\service\utils\best_point_mixin.py", line 311, in _get_pareto_optimal_parameters return best_point_utils.get_pareto_optimal_parameters( File "someone\Python3.9.4\lib\site-packages\ax\service\utils\best_point.py", line 568, in get_pareto_optimal_parameters objective_thresholds_override = modelbridge.infer_objective_thresholds( File "someone\Python3.9.4\lib\site-packages\ax\modelbridge\torch.py", line 185, in infer_objective_thresholds model = checked_cast(MultiObjectiveBotorchModel, self.model) File "someone\Python3.9.4\lib\site-packages\ax\utils\common\typeutils.py", line 58, in checked_cast raise exception if exception is not None else ValueError( ValueError: Value was not of type <class 'ax.models.torch.botorch_moo.MultiObjectiveBotorchModel'>: <ax.models.torch.botorch_modular.model.BoTorchModel object at 0x000002C0DDECE310>
So I understood that we are supposed to use
BOTORCH_MODULAR
for moo as well, but how can I avoid this error, as the modelregistry specifies the model_class to be aModularBoTorchModel
? Thank you very much for your help! Y.