tensorflow / similarity

TensorFlow Similarity is a python package focused on making similarity learning quick and easy.
Apache License 2.0
1.01k stars 104 forks source link

tfsim.visualization.projector fails with bokeh 3.0.0+ #306

Closed peter-doggart closed 1 year ago

peter-doggart commented 1 year ago

There is a small bug that causes tfsim.visualization.projector to fail if bokeh 3.0.0 or above is installed. The error is:

AttributeError: unexpected attribute 'plot_width' to figure, similar attributes are outer_width, width or min_width.

There was a breaking change in bokeh 3.0.0 major version which removed the plot_width and plot_height attributes from figure: https://github.com/bokeh/bokeh/issues/12543#issuecomment-1300970727

plot_width and plot_height were just aliases for width and height as far as I can see in the 2.x series, so I think the only change required is a small update here:

fig = figure(
    tooltips=tooltips,
    width=plot_size,
    height=plot_size,
    active_drag=active_drag,
    active_scroll="wheel_zoom",
)
owenvallis commented 1 year ago

Hi Peter, this is fixed in the Development branch. Let me cherry pick the change and merge it into master.