-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Add fastplotlib #27629
Add fastplotlib #27629
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Hi! This is the staged-recipes linter and your PR looks excellent! 🚀 |
I'll circle bback in a few weeks, |
v0.3.0 just released |
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( I do have some suggestions for making it better though... For recipes/fastplotlib/meta.yaml:
This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/13025114374. Examine the logs at this URL for more detail. |
need to force |
it checks for that at import time? do you have run code at import time? could we disable that? |
fpl exposes |
- pygfx ~=0.7.0 | ||
- cmap | ||
|
||
test: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test: | |
test: | |
script_env: | |
- WGPU_FORCE_OFFSCREEN=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah didn't work unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be my guess as well. Or rather RENDERCANVAS_FORCE_OFFSCREEN
(WGPU_FORCE_OFFSCREEN
does the same thing but is backwards compat).
Could it be that it failed for a different reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To expand a bit: if one of these env vars is set, it should not be able to reach the raising of the exception that the builds currently fail with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might have to set the env var for the entire yaml not just the test, not sure if that yaml keyword is valid for conda-forge
@hmaarrfk can you give me write access to your fork, I can iterate faster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no i unfortnately can't do that since I use this fork alot and I have super powers at conda-forge.
You are free, if you want to just copy all that I did and submit it as your own work (I give you @kushalkolar the right to do this with no attribution).
Tag me for a review, I can help.
But generally a few ways forward:
- Change the behavior of fastplotlib -- i understsand why you might not have time to do this now.
- Write a run_test.py file that just set the os.environ key you need: https://github.com/conda-forge/ipython-feedstock/blob/a8d52e4bf5029876b98e2d9c116252f9f4082e2b/recipe/run_test.py
the run_test.py
will give you more control over how the tests are run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK so i ended up doing this:
===== testing package: fastplotlib-0.3.0-pyhd8ed1ab_0 =====
running run_test.py
/home/conda/staged-recipes/build_artifacts/fastplotlib_1738640761567/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.10/site-packages/fastplotlib/__init__.py:29: RuntimeWarning: WGPU could not enumerate any adapters, fastplotlib will not work.
This is caused by one of the following:
1. You do not have a hardware GPU installed and you do not have software rendering (ex. lavapipe) installed either
2. Your GPU drivers are not installed or something is wrong with your GPU driver installation, re-installing the latest drivers from your hardware vendor (probably Nvidia or AMD) may help.
3. You are missing system libraries that are required for WGPU to access GPU(s), this is common in cloud computing environments.
These two links can help you troubleshoot:
https://wgpu-py.readthedocs.io/en/stable/start.html#platform-requirements
https://fastplotlib.readthedocs.io/en/latest/user_guide/gpu.html
warn(
0.3.0
===== fastplotlib-0.3.0-pyhd8ed1ab_0 OK =====
seems the tests are OK right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup! looks gtg
Co-authored-by: Kushal Kolar <kushalkolar@gmail.com>
Co-authored-by: Kushal Kolar <kushalkolar@gmail.com>
Co-authored-by: Kushal Kolar <kushalkolar@gmail.com>
Co-authored-by: Kushal Kolar <kushalkolar@gmail.com>
Just FYI: This kind of initialization during import typically makes it hard to integrate within other projects. This might be the first issue I open after I start to play with it! |
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipes/fastplotlib/meta.yaml:
For recipes/fastplotlib/meta.yaml:
This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/13082321591. Examine the logs at this URL for more detail. |
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
https://github.com/fastplotlib/fastplotlib/blob/d4af1a900a8d7c89bcc25601badf1bf1a9a92ff2/fastplotlib/utils/gui.py#L11 is pretty annoying to happen at import time. I get you are writing an application, and you can do that, but IMO the "library" aspect of FPL should not be imposing this. |
fpl isn't an application, it's definitely meant to just be a lib @almarklein any ideas here? We could move the auto canvas backend selection to when a figure is created for the first time 🤔 |
I would just try to just remove that entire file and see if your code still works…. |
From what I remember about this, is that fastplotlib prefers/preferred qt, because it used GUI elements that were either qt/ipywidgets. So if a glfw widget was created (the default for rendercanvas) it could not display such widgets. I have not kept track very well, but I've seen a lot of imgui in fastplotlib, so maybe the qt-specific code can be removed? Then this GUI pre-selection can also be removed. Otherwise, we could perhaps think of a way to prefer qt using an environment variable. |
It's actually because we import loop from That's where the error in this workflow is coming from. A bit busy now but will try playing with it this later in the week. |
ok excited to try this out. thanks you two! |
Checklist
url
) rather than a repo (e.g.git_url
) is used in your recipe (see here for more details).