Skip to content

Suppress NumPy deprecation warnings in Robot Control GUI#15

Merged
dgaida merged 2 commits into
masterfrom
suppress-numpy-deprecation-warnings-gradio-gui-8785046240825489184
Feb 26, 2026
Merged

Suppress NumPy deprecation warnings in Robot Control GUI#15
dgaida merged 2 commits into
masterfrom
suppress-numpy-deprecation-warnings-gradio-gui-8785046240825489184

Conversation

@dgaida

@dgaida dgaida commented Feb 26, 2026

Copy link
Copy Markdown
Owner

Suppressed DeprecationWarning related to np.bool8 in robot_gui/mcp_app.py. This warning is triggered internally by Gradio when using NumPy 1.24+. Verified the fix with a test script and confirmed that all 61 existing tests still pass.


PR created automatically by Jules for task 8785046240825489184 started by @dgaida

Gradio 5.x/6.x internally uses `np.bool8`, which is deprecated in NumPy 1.24+ and removed in NumPy 2.x. This causes numerous `DeprecationWarning` messages in the console when running the GUI.

This change adds a targeted warning filter to `robot_gui/mcp_app.py` to suppress these specific warnings and maintain a clean console output for the user.

Co-authored-by: dgaida <23057824+dgaida@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Added `# noqa: E402` to imports that follow executable code (specifically the NumPy deprecation warning filter and the `sys.path` manipulation). This ensures the file passes Ruff linting while keeping the warning filter early enough to be effective against Gradio import-time warnings.

Co-authored-by: dgaida <23057824+dgaida@users.noreply.github.com>
@dgaida dgaida merged commit ac50aba into master Feb 26, 2026
5 checks passed
@dgaida dgaida deleted the suppress-numpy-deprecation-warnings-gradio-gui-8785046240825489184 branch February 26, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant