Repository navigation
Replies: 1 comment
|
Update 2026-10-28. The warning slice is on Importing That is option 1’s first step. Comments still welcome on the two reasons and on whether a one-release warning window is enough. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Why this thread
GPy.plotting.matplot_dep.visualizeis the 2012–2015 interactive latent-space explorer: click or drag in a 2-D latent scatter, reconstruct the observation, and (when Q>2) pick which two latent axes to plot from an ARD bar chart. We are deprecating it and moving that behaviour out of GPy.This is not a rewrite of static GPy plotting (
plot,plot_latent,plot_confidence). Those stay.Design is in CIP-000B. The replacement lives in a separate package, vidden, which is under construction. The warning slice is on
main(#1253): importingvisualize, constructing a viewer, or callingdata_playemits aDeprecationWarningthat points here and at vidden. The file is still importable. This thread remains the place to comment on what is in the module, why it should leave GPy, and what should remain.Please read the inventory and the two proposed reasons below, then comment — especially if you still use these viewers in teaching or research.
What is in
visualize.pyThe file is a small GUI toolkit glued to GPLVM
predict, not model code.data_showmodify/closematplotlib_showvpython_showvector_showbgplvm_oil,ssgplvm_oillvmstick,brendan_faces,olivetti_faces,cmu_mocap, …lvm_dimselectstick_bgplvm, oil dimselectlvm_subplotsimage_showimshowbrendan_faces,olivetti_facesstick_showconnectmatrixstick,stick_play,stick_bgplvmskeleton_showcmu_mocapmocap_data_show/_vpythondata_playtime.sleepstick_playvisual_availableimport visualsucceededbcgplvm_stick/bcgplvm_linear_stickThe behaviour we still want is unchanged: a pointer in latent space,
model.predict(X*), a reconstruction pane. That is a pointer stream pluspredict, not a matplotlib GUI-backend problem.Why deprecate it (proposed rationale)
Two reasons. Both are open for comment.
1. Matplotlib callbacks do not sit easily on macOS (or Jupyter)
The old viewers bind
button_press_event/motion_notify_eventon a matplotlib canvas. That only works when a GUI event loop is integrated with the interpreter. On macOS that is the Cocoa backend (macosxin matplotlib,osxin IPython). That path has broken across non-framework Python builds, conda envs, Jupyter's default inline backend,plt.show(block=False)plusinput(), and nestedcanvas.draw()(RecursionError in transforms).VPython (
import visual) for 3-D skeleton views is effectively dead in the form GPy imports.ipympl (
%matplotlib widget) can recover some of the 2-D callbacks in Jupyter. It is a stopgap: it still uses matplotlib event handlers and does not fix VPython or the desktop demos. We do not want another round of local patches aroundvisualize.py.2. Interactive visualisation should not ship inside the core library
GPy's job is inference: kernels, models,
predict. Interactive viewers pull in GUI backends (matplotlib event loops, historically VPython, and in any rewrite Panel / HoloViews / Bokeh). Those dependencies do not belong on the defaultpip install gpypath, and they do not belong in the same source tree as the numerical core.A separate package can evolve on its own release clock, duck-type any model with
Xandpredict, and stay out of GPy's test matrix. That is vidden. GPy remains a client, not a host.What stays in GPy
GPy.plotting(matplotlib and plotly backends):plot,plot_latent,plot_confidence, scales, and so on.X*of shape(1, Q)in,model.predict(X*)[0]out.Replacement
vidden is a browser explorer. Pointer events call
model.predictin Python. Current demos (from that repository):GPy's remaining CIP-000B work is: stop examples importing
visualizeonce those demos cover them, then remove or shrink the file. The warning itself is already onmain.Options
main(#1253).visualizestays importable through one more cycle with a warning; examples still calllvm/image_show/stick_showuntil those demos move.visualizeindefinitely as a deprecated-but-present matplotlib path for anyone whose desktop GUI still works.gpy[explore]) instead of a separate package. We already chose against this so GPy does not grow Panel/HoloViews; arguing the other way is still useful.connectmatrices, skeletonto_xyz) even after the viewers go, if models or other tools still need them.Questions
GPy.utilafter the viewers leave?Comments welcome — including disagreement with either of the two reasons. If you use
lvm/image_show/stick_showin notes or courses, a short “we still need X” is exactly the signal we want.Asking for eyes
Tagging people who have historically maintained GPy plotting, demos, or teaching use (please ignore if this is no longer your beat — a short “still relevant / not me” is enough):
@mzwiessele @jameshensman @alansaul @MartinBubel @ekalosak @zhenwendai @nfusi @mikecroucher @bobturneruk @letterdaniel @AlexGrig @lionfish0 @ric70x7
All reactions