-
Notifications
You must be signed in to change notification settings - Fork 7
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
TypeError in osys.update_leaves() #123
Comments
Got the same error in the Phase mask design demo, I suspect this is a me problem and not a dLux problem. |
Hey @Jashcraf, Thanks for the issue Jordan |
Hi @Jordan-Dennis 👋 |
Maybe I can't, it looks like Google Collab only supports Python 3.7 and 3.6 Does dLux work on M1 chips? I tried importing Jax and it was a little rude to my poor computer. |
Hmmmm, should work on M1, @LouisDesdoigts and @benjaminpope are both running on MAC. |
I just checked and it is limited to CPU is the only downside. |
Oh that's fine I'm not trying to do anything crazy, just optimize some thin films to make finding the aliens a little easier I saw that I might need to build it separately jax-ml/jax#5501 (comment) |
Yeah, this stack post links in a whole lot of resources but that is the best I can do I'm afraid. We might change our use of the |
Long ago I accepted my curse of running into trouble installing packages every time I start a new project - I will prevail. Thanks for the help! I'll give this a shot :) |
Steps I used to build Jax from Source taken from Jax's documentation Build jaxlib
Well let's try the method outlined in this Stack Overflew thread.
Going to try coming back to this again later. |
Try installing from conda forge.
conda install -c conda-forge jaxlib
conda install -c conda-forge jax
Works fine on my M1 and my older mac
———————————————
Dr Benjamin Pope (he/him)
Lecturer in Astrophysics
University of Queensland
benjaminpope.github.io
…________________________________
From: Jaren Ashcraft ***@***.***>
Sent: Monday, October 3, 2022 10:15:18 AM
To: LouisDesdoigts/dLux ***@***.***>
Cc: Benjamin Pope ***@***.***>; Mention ***@***.***>
Subject: Re: [LouisDesdoigts/dLux] TypeError in osys.update_leaves() (Issue #123)
Steps I used to build Jax from Source taken from Jax's documentation<https://jax.readthedocs.io/en/latest/developer.html>
Build jaxlib
1. git clone https://github.com/google/jax
2. cd jax
3. Install Xcode & command line utils from App store
4. Realize that you need to update your OS
5. Play Assasin's Creed for 4 hours while your OS updates because it's a weekend and you deserve it
6. Install Xcode
7. python build/build.py
8. doesn't execute successfully.
9. panic
Well let's try the method outlined in this Stack Overflew thread<https://stackoverflow.com/questions/70815864/how-to-install-trax-jax-jaxlib-on-m1-mac-on-macos-12>.
1. Create new conda environment
2. conda install numpy; conda install six
3. pip install -U pip pip install -U https://storage.googleapis.com/jax-releases/mac/jaxlib-0.1.75-cp310-none-macosx_11_0_arm64.whl
4. Not a supported wheel on this platform, panic again
5. python build/build.py --target_cpu darwin_arm64
6. Doesn't build successfully
7. pip install --upgrade "jax[cpu]"
8. Doesn't build successfully
Going to try coming back to this again later.
—
Reply to this email directly, view it on GitHub<#123 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABN6YFK3CWWXEZ4MVOI7VRDWBIQRNANCNFSM6AAAAAAQ2AOL2Y>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I know that it is a bit late, but is there any chance you could repeat the error. I'm curious as to the 4 hidden frames since we don't actually use generic types. This seem's like something that might come from |
@benjaminpope trying to install from conda forge with a fresh environment. Had to downgrade to < numpy v1.23, so I switched to 1.22. Tried Got an error that I'm having trouble understanding. If I run the cell again it raises an AttributeError I see that I didn't install Python 3.10.4 like @Jordan-Dennis recommended, so I'm upgrading using Same errors unfortunately with
If it's any help, it seems that I've installed jax and jaxlib versions 0.3.20 |
Let us know how that goes... the error messages indicate you're using Python 3.8 which does seem like the culprit. I would suggest creating a conda environment with Python 3.10, and using conda-forge to install jaxlib then jax |
This is turning into maybe a problem where I can't install Jax, rather than being a dLux problem, so maybe it's worth closing the issue so I stop bugging you all? |
Hahaha, I don't mind, we like having users and these are things that we need to think about. If you are able to work it out we will probably use it in an installation troubleshooting guide so it is helpful to us. I would be a little scared of the |
So I also have a windows machine, and somehow I've gotten it working on that using this method of installing jax https://github.com/cloudhan/jax-windows-builder The phase mask design example executed like a charm! I'll continue sleuthing tomorrow, or maybe open an issue on Jax's github to see if they can figure out what might be going wrong. |
Haha, that was a process, good job 👍. I'm super busy at the moment but I want to look into your original problem with the I'll leave the issue open for now to remind myself, and since you didn't actually get it working on your Mac. |
So I suspect that @Jashcraf may be running this through a Rosetta version of bash/zsh. I can't see why else it would possibly give a not supported error for the ARM wheel when running on an ARM architecture. As for the typing, I think this may have been due to running the pip version of ∂Lux with the new tutorials. I could be wrong, I'll need to try and reproduce the error myself (unless @Jashcraf has the notebook handy) |
Time to push an update to PyPI? |
Its always time to push an update to PyPi, there's too much dev happening 😂. Next PyPi update is the 1.0, that's my goal. |
I'd probably push a version a bit sooner than that if we're doing collaboration with Jaren et al |
Will push a new version by the end of the week - The new source/instrument stuff will force another tutorial update anyway. |
Hi there! New user to dLux and am trying to run the Phase Retrieval in dLux demo on Google Collab.
I'm just copy-pasting the code into a collab notebook, but when it's time to run this block of code I get a TypeError from
osys_update_leaves()
Could anyone point me to what might be going wrong?
The text was updated successfully, but these errors were encountered: