GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix typo in the requested limit name of the wgpu device by jcafhe · Pull Request #679 · fastplotlib/fastplotlib

Conversation

@jcafhe

@jcafhe jcafhe commented Nov 22, 2024

Copy link
Copy Markdown
Contributor

Hi,

when running different examples involving images, the following exception is raised:

Traceback (most recent call last):
  File "***\fastplotlib\examples\gridplot\gridplot_non_square.py", line 20, in <module>
    figure[0, 0].add_image(data=im)
  File "***\fastplotlib\fastplotlib\layouts\_graphic_methods_mixin.py", line 75, in add_image
    return self._create_graphic(
           ^^^^^^^^^^^^^^^^^^^^^
  File "***\fastplotlib\fastplotlib\layouts\_graphic_methods_mixin.py", line 24, in _create_graphic
    graphic = graphic_class(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "***\fastplotlib\fastplotlib\graphics\image.py", line 126, in __init__
    self._data = TextureArray(data, isolated_buffer=isolated_buffer)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "***\fastplotlib\fastplotlib\graphics\_features\_image.py", line 24, in __init__
    self._texture_limit_2d = shared.device.limits["max-texture-dimension2d"]
                             ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'max-texture-dimension2d'

It fails for the following examples (non-exhaustive list), on windows10, python 3.12.6, pygfx 0.6.0, wgpu 0.19.1 (can't test right now on linux because of an error related to imgui):

  • example/gridplot/*
  • heatmap/heatmap.py
  • image/*

I believe there's a typo in the string passed to the limits property of the wgpu.Device object. From the wgpu documentation (Rust), the constant is named 'max_texture_dimension_2d', at least since wgpu-0.10.1:
https://docs.rs/wgpu/latest/wgpu/struct.Limits.html#structfield.max_texture_dimension_2d

By appling the lower-case style, the examples now work by adding an hyphen before "2d". I don't know if it is specific to my setup, but this fix seems to be aligned with the wgpu API.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@jcafhe
fix typo in the requested limit name of the wgpu device.
29f7a43
@jcafhe
jcafhe requested review from clewis7 and kushalkolar as code owners November 22, 2024 15:23
@kushalkolar

kushalkolar commented Nov 22, 2024

Copy link
Copy Markdown
Member

Thanks! Looks like this change in wgpu is now in the release: pygfx/wgpu-py#617

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jcafhe

jcafhe commented Nov 22, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Nice find! This explains why there were no errors before. I didn't think to look at the issue tracker of pygfx.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Nov 23, 2024

Copy link
Copy Markdown
Member

test failures are due to pygfx/wgpu-py#644, need to wait for the next release of wgpu with pygfx/wgpu-py#645

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Nov 25, 2024

Copy link
Copy Markdown
Member

If you can update the test as well it should be good to go! https://github.com/fastplotlib/fastplotlib/actions/runs/11975376261/job/33491202021?pr=679#step:8:24

jcafhe reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jcafhe
fix test config.
2d1669f
@jcafhe

jcafhe commented Nov 26, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

That should be ok, all tests pass on my machine, with pygfx installed from its main branch, to be aligned with the CI setup :
pip install git+https://github.com/pygfx/pygfx.git@main.

Do you think that the required pygfx version should be updated too, in the setup.py?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jcafhe

jcafhe commented Nov 26, 2024

Copy link
Copy Markdown
Contributor Author

Sorry, there are still some errors. I will investigate ...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jcafhe added 2 commits November 26, 2024 19:15
@jcafhe
fix examples/test and docs
ed1a12c
@jcafhe
fix max-texture-dimension-2d limit name and replace underscore by hyp…
1a6894f
…hen for the other limits.
@kushalkolar

kushalkolar commented Nov 26, 2024

Copy link
Copy Markdown
Member

Looks like there are no imgui wheels for python 3.10 so it's trying to build but it requires libxrandr-dev, you can add it to the same place where all other apt packages are installed here and here

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jcafhe
fix missing dependency (libxrandr) to compile GLFW during building wh…
f71eef4
…eel for imgui-bundle.
@jcafhe

jcafhe commented Nov 27, 2024

Copy link
Copy Markdown
Contributor Author

Thanks. I've added the installation of xorg-dev which should contain libxrandr for ubuntu, as suggested in GLFW documentation.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kushalkolar added 2 commits November 27, 2024 20:23
@kushalkolar
update CI timeout
2eb42df
@kushalkolar
update timeout in non-nb test job
326ad7c
@kushalkolar

kushalkolar commented Dec 2, 2024

Copy link
Copy Markdown
Member

had to update the CI timeout, it takes longer since it has to build imgui 1.5.2 for python 3.10. Anyways this PR will fix all those issues: pygfx/wgpu-py#649

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar

kushalkolar commented Dec 2, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

ok now it looks like the latest release of pyav 14 hours ago breaks imageio https://github.com/PyAV-Org/PyAV/releases

posted in imageio: imageio/imageio#1111

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jcafhe

jcafhe commented Dec 5, 2024

Copy link
Copy Markdown
Contributor Author

ok, no problem, so we just have to wait I guess.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar
kushalkolar changed the base branch from main to extinguish-fires December 25, 2024 04:35
@kushalkolar

kushalkolar commented Dec 25, 2024

Copy link
Copy Markdown
Member

I'm going to merge this into a temporary branch where we're updating things w.r.t. upstream changes like #686 where we're switching from pyav to ffmpeg.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kushalkolar
kushalkolar merged commit 0937309 into fastplotlib:extinguish-fires Dec 25, 2024
@kushalkolar kushalkolar mentioned this pull request Dec 25, 2024
updates related to upstream changes #687
Merged
clewis7 pushed a commit that referenced this pull request Jan 6, 2025
@kushalkolar @jcafhe
updates related to upstream changes (#687)
07053e7
* use imageio[ffmpeg] instead of pyav (#686)

* fix typo in the requested limit name of the wgpu device (#679)

* fix typo in the requested limit name of the wgpu device.

* fix test config.

* fix examples/test and docs

* fix max-texture-dimension-2d limit name and replace underscore by hyphen for the other limits.

* fix missing dependency (libxrandr) to compile GLFW during building wheel for imgui-bundle.

* update CI timeout

* update timeout in non-nb test job

---------

Co-authored-by: Kushal Kolar <[email protected]>

* update to use pygfx.TextureMap

* forgot to set imageio[ffmpeg] for all extras

* migrate to RenderCanvas, remove event_filter stuff for imgui since that was fixed in pygfx

* remove very old irrelevant example

* fix docstring

* update examples to use fpl.loop.run()

* update API docs

* black

* import ImageWidget only if imgui is installed

* enumerate_adapters() -> enumerate_adapters_sync()

* remove annoying warnings from cmap

* remove more cmap warnings

* black

---------

Co-authored-by: Jérémie Fache <[email protected]>
FlynnOConnell pushed a commit to FlynnOConnell/fastplotlib that referenced this pull request Jan 7, 2025
@kushalkolar @jcafhe @FlynnOConnell
updates related to upstream changes (fastplotlib#687)
c537ae6
* use imageio[ffmpeg] instead of pyav (fastplotlib#686)

* fix typo in the requested limit name of the wgpu device (fastplotlib#679)

* fix typo in the requested limit name of the wgpu device.

* fix test config.

* fix examples/test and docs

* fix max-texture-dimension-2d limit name and replace underscore by hyphen for the other limits.

* fix missing dependency (libxrandr) to compile GLFW during building wheel for imgui-bundle.

* update CI timeout

* update timeout in non-nb test job

---------

Co-authored-by: Kushal Kolar <[email protected]>

* update to use pygfx.TextureMap

* forgot to set imageio[ffmpeg] for all extras

* migrate to RenderCanvas, remove event_filter stuff for imgui since that was fixed in pygfx

* remove very old irrelevant example

* fix docstring

* update examples to use fpl.loop.run()

* update API docs

* black

* import ImageWidget only if imgui is installed

* enumerate_adapters() -> enumerate_adapters_sync()

* remove annoying warnings from cmap

* remove more cmap warnings

* black

---------

Co-authored-by: Jérémie Fache <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kushalkolar kushalkolar Awaiting requested review from kushalkolar
@clewis7 clewis7 Awaiting requested review from clewis7

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@jcafhe @kushalkolar
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.