Skip to content

Dashboard Plugin: Update on view change causes filters to reset immediately #300

@Tianqi-Yao

Description

@Tianqi-Yao

This issue occurs in the FiftyOne Dashboard Plugin when the "Update on view change" option is enabled.

When selecting filters dynamically from the left sidebar, the current view refreshes immediately. As a result, the filter that was just applied gets reverted right away, making it impossible to actually filter the dataset.

I can briefly see that the filter is applied (because the chart updates), but the view refresh happens immediately afterward and resets the filter state.

Steps to Reproduce

  1. Open the Dashboard Plugin
  2. Enable "Update on view change"
  3. Apply a filter from the left sidebar
  4. The chart updates briefly
  5. The view refreshes immediately and the filter is cleared

Expected Behavior

The filter should remain applied so that users can refine the dataset view.

Actual Behavior

The view refresh triggered by "Update on view change" immediately resets the filter, preventing the filter from taking effect.

Additional Context

The behavior can be seen in the GIF below.

Image

my code:

import numpy as np
import pandas as pd
from fiftyone import ViewField as F

dataset = ctx.view
threshold = 0.01
view = dataset.filter_labels("pred_yolo11l_20pct_null_images_add_rawData_batch_4_final", F("confidence") > threshold, only_matches=False)
times, count = view.values(["datetime",F("pred_yolo11l_20pct_null_images_add_rawData_batch_4_final.detections").length()])

pairs = [(t.isoformat(), v) for t, v in zip(times, count) if t]

data = {
    "x": [p[0] for p in pairs],
    "y": [p[1] for p in pairs],
    "name": f"{ctx.dataset.name}_count_pct{int(threshold*100)}"
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions