Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Setting view while a panel is opened in a remote session breaks the app #4603

Open
1 of 3 tasks
ed-cho opened this issue Jul 31, 2024 · 0 comments
Open
1 of 3 tasks
Labels
bug Bug fixes

Comments

@ed-cho
Copy link

ed-cho commented Jul 31, 2024

Instructions

Thank you for submitting an issue. Please refer to our
issue policy
for information on what types of issues we address.

  1. Please fill in this template to ensure a timely and thorough response
  2. Remove the section instructions but leave the section header
  3. Place an "x" between the brackets next to an option if it applies. For
    example:
    • Selected option
  4. Please delete everything above this line before submitting the issue

Describe the problem

Describe the problem clearly here. Include descriptions of the expected
behavior and the actual behavior.

If you launch the app remotely, and try to set view (ctx.ops.set_view or ctx.trigger(“set_view”)) while a panel is opened, the app breaks. Any of the plugins that involve a panel (reverse image search, voxelgpt, etc.) is therefore not working when launching fiftyone through remote.

Code to reproduce issue

Provide a reproducible test case that is the bare minimum necessary to generate
the problem. Please avoid sharing code that relies on your local data or
datasets. Include a short video or screenshot if the bug is in the App.

Python operator

class TestSetView(foo.Operator):
    @property
    def config(self):
        return foo.OperatorConfig(
            name="test_set_view",
            label="Test set view",
            dynamic=True,
        )

    def execute(self, ctx):
        view = ctx.dataset.select(["random_sample_id"])
        ctx.ops.set_view(view=view)

Typescript for panel

export default function TestPanel() {
    const executor = useOperatorExecutor("@test/test_set_view")

    return (
        <>
            <h1>Test Panel</h1>
            <Button onClick={() => executor.execute()}>Close and set view</Button>
        </>
    );
}

Server command line (Linux)

fiftyone app launch --remote --wait -1 --port 5151

Local command line (Mac)

fiftyone app connect --destination remote_server_address --port 5151

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 22.04):
  • Python version (python --version): 3.10.12
  • FiftyOne version (fiftyone --version): 0.23.8
  • FiftyOne installed from (pip or source): pip

Other info/logs

Include any logs or source code that would be helpful to diagnose the problem.
If including tracebacks, please include the full traceback. Large logs and
files should be attached. Please do not use screenshots for sharing text. Code
snippets should be used instead when providing tracebacks, logs, etc.

Once you open the app remotely (whether its through
fiftyone app launch --remote --wait -1 --port 5151 and fiftyone app connect as described earlier, or through a jupyter notebook on a remote ssh) and try to set view in however ways possible through a python / js operator while any panel is still open, the app will break and redirect you to the default fiftyone page.

You can also do select_group_slices(media_type=“image”) and the likes on the app directly while a panel is open and cause the same behaviour.

Once it breaks, the app doesn’t work anymore. it continuously states "Could not connect session, trying again in 10 seconds"

Willingness to contribute

The FiftyOne Community encourages bug fix contributions. Would you or another
member of your organization be willing to contribute a fix for this bug to the
FiftyOne codebase?

  • Yes. I can contribute a fix for this bug independently
  • [ O ] Yes. I would be willing to contribute a fix for this bug with guidance
    from the FiftyOne community
  • No. I cannot contribute a bug fix at this time
@ed-cho ed-cho added the bug Bug fixes label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

No branches or pull requests

1 participant