Skip to content

Commit

Permalink
Merge pull request #4740 from voxel51/main
Browse files Browse the repository at this point in the history
Merge main
  • Loading branch information
benjaminpkane authored Aug 27, 2024
2 parents 167a392 + 868e339 commit e8ec301
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 6 deletions.
Binary file modified docs/source/images/app/app-evaluation-patches.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-fields.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-image-visualizer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-label-selection.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-multiple-media-fields.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-object-patches.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-selection.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-sidebar-groups.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-sidebar-mode.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-tagging-expanded.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-tagging-samples.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/images/app/app-video-visualizer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions docs/source/plugins/developing_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1837,10 +1837,14 @@ subsequent sections.
# Define components that appear in the panel's main body
panel.str("event", label="The last event", view=types.LabelValueView())
panel.obj("event_data", label="The last event data", view=types.JSONView())
panel.obj(
"event_data", label="The last event data", view=types.JSONView()
)
# Display a checkbox to toggle between plot and compute visualization button
show_compute_visualization_btn = ctx.panel.get_state("show_start_button", True)
show_compute_visualization_btn = ctx.panel.get_state(
"show_start_button", True
)
panel.bool(
"show_start_button",
label="Show compute visualization button",
Expand All @@ -1867,7 +1871,9 @@ subsequent sections.
height="400px",
)
return types.Property(panel, view=types.GridView(orientation="vertical"))
return types.Property(
panel, view=types.GridView(orientation="vertical")
)
#######################################################################
# Builtin events
Expand Down Expand Up @@ -2014,7 +2020,11 @@ subsequent sections.
# Format results for plotly
x, y = zip(*results.points.tolist())
plot_data = [{"x": x, "y": y, "type": "scatter", "mode": "markers"}]
ids = results.sample_ids
plot_data = [
{"x": x, "y": y, "ids": ids, "type": "scatter", "mode": "markers"}
]
# Store large content as panel data for efficiency
ctx.panel.set_data("embeddings", plot_data)
Expand All @@ -2035,8 +2045,8 @@ subsequent sections.
ctx.ops.notify(f"Check out {url} for more information")
def on_selected_embeddings(self, ctx):
# Retrieve data from plot
selected_points = ctx.panel.state.embeddings.get("data", [])
# Get selected points from event params
selected_points = ctx.params.get("data", [])
selected_sample_ids = [d.get("id", None) for d in selected_points]
# Conditionally trigger a builtin operation via `ctx.ops`
Expand Down

0 comments on commit e8ec301

Please sign in to comment.