From 6fb19463ecccaa7f21c80910380149ee0bd626db Mon Sep 17 00:00:00 2001 From: Sait Cakmak Date: Tue, 18 Aug 2026 11:37:36 -0700 Subject: [PATCH 1/2] Preserve numeric contour arrays through Plotly serialization (#5278) Summary: Convert the contour trace `x`, `y`, and `z` values to plain Python lists before Plotly serialization. This prevents Plotly 6 from preserving NumPy-backed values as base64 typed-array dictionaries when `PlotlyAnalysisCard.get_figure()` reconstructs the figure. Fixes OSS CI failures caused by the previous diff. These didn't surface in internal infra due to different plotly versions used. Differential Revision: D116474354 --- ax/analysis/plotly/surface/contour.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ax/analysis/plotly/surface/contour.py b/ax/analysis/plotly/surface/contour.py index c38b5f3962d..35ce149921d 100644 --- a/ax/analysis/plotly/surface/contour.py +++ b/ax/analysis/plotly/surface/contour.py @@ -384,9 +384,9 @@ def _prepare_plot( fig = go.Figure( data=go.Contour( - z=z_values, - x=z_grid.columns.values, - y=z_grid.index.values, + z=z_values.tolist(), + x=z_grid.columns.tolist(), + y=z_grid.index.tolist(), colorscale=METRIC_CONTINUOUS_COLOR_SCALE, showscale=True, colorbar={ From 451d179ee7a69edc7bb02d910ab37218fa257626 Mon Sep 17 00:00:00 2001 From: Sait Cakmak Date: Tue, 18 Aug 2026 11:37:36 -0700 Subject: [PATCH 2/2] Propagate generator kwargs to transfer-learning fallback (#5277) Summary: Pass `additional_generator_kwargs` to the single-task fallback so shared acquisition behavior such as BONSAI pruning applies regardless of model selection. Document that the kwargs must be compatible with both generators and add constructor coverage. Differential Revision: D116468995 --- ax/adapter/transfer_learning/adapter.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ax/adapter/transfer_learning/adapter.py b/ax/adapter/transfer_learning/adapter.py index 676f70ad46d..87ada7e43d4 100644 --- a/ax/adapter/transfer_learning/adapter.py +++ b/ax/adapter/transfer_learning/adapter.py @@ -788,8 +788,10 @@ def transfer_learning_generator_specs_constructor( model's input constructor. fit_tracking_metrics: Whether to fit the generator on tracking metrics. Passed to the `TransferLearningAdapter`. - additional_generator_kwargs: Additional kwargs to be passed - to the BoTorchGenerator + additional_generator_kwargs: Additional kwargs to be passed to each + BoTorchGenerator. When model selection is enabled, these kwargs must be + compatible with both the transfer learning model and the single-task + fallback. Returns: A tuple containing BOTL generator specs in case model selection is not enabled, @@ -839,7 +841,10 @@ def transfer_learning_generator_specs_constructor( ] if use_model_selection: botl_specs.append( - GeneratorSpec(generator_enum=Generators.BOTORCH_MODULAR), + GeneratorSpec( + generator_enum=Generators.BOTORCH_MODULAR, + generator_kwargs=additional_generator_kwargs, + ), ) best_model_selector = SingleDiagnosticBestModelSelector( diagnostic="Rank correlation",