-
Notifications
You must be signed in to change notification settings - Fork 150
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 support for M1 macs #143
Comments
Havin just the same issue. I use miniforge conda. |
Hi Sandesh, The recommend bazel version for ml-metadata is 3.7.2. I wonder could you downgrade your bazel version and give it another try to see if the error persists? |
This is rather tricky cause bazel itself started supporting There is a probably way to build bazel from source, but anyway- since the main error from last time was the missing option
|
Based on the error log above, I tried building |
Thanks for the investigation, sandesh! Internally, we are discussing about the priority for support M1 Mac. I will come back with more details. |
Thanks. If it helps, the main use case for me is to use with TFX to deploy pipelines on Vortex/AI platform. |
Update Bazel settings to support both macos and macos_arm64. Use the bazel_skylib library for config selects. Reflect changes in setup.py. PiperOrigin-RevId: 432116433
Unfortunately, the problem persists after the last commit. The error messages does not appear to have chaged from what @sandeshbhatjr reported. I'm using bazel version 4.2.1. |
The entire TF community is current working on support with M1 Mac. This code change(719202b) is initial and we are currently reviewing it with Apple team. Will update this issue as long as we heard back from Apple team. Thanks! |
Is there a status update for this? |
The POC internally would contact with Apple in June 17. After receiving his updates, I would update here. |
@BrianSong Any update on this, please? |
Would be awesome to get an update on this @BrianSong :-) |
Thanks for following this up! @safoinme @htahir1 I reached out to the POC in late June for his updates regarding the interaction with Apple team. Unfortunately, he said this specific topic was not mentioned/addressed as he planned. This issue is now reassigned to a new TPM who is currently out of office until next week. I will reach out to her as soon as she is back and update any progress I have. Thanks for being patient with me. |
problem persist with
|
I am back with some updates. Our new TPM is working closely with Apple team and the TensorFlow community is working together for the M1 Mac support. In terms of prioritization, it seems that TensorFlow would be landed first and then it would be MLMD/TFX. But our TPM is scheduling a possible working session with Apple team for answering questions and review code change like 719202b. Will update this thread if we have any new progress. Thanks for being patient! |
I am wondering whether there has been an update on this issue. So struggling with Mac M1 here |
I've also been trying to make this work. I was able to work around the error in #143 (comment) by rewriting the calls to
|
Hi, our TPM is still working on scheduling the working session with Apple team regarding the M1 Mac support for MLMD. I have reached out to her again and will update the thread as long as I hear any update from her. |
@BrianSong what is missing and what can be contributed? |
I'd also be interested to contribute. @BrianSong would be happy to hear whats missing |
@BrianSong I'm not quite sure I understand - that commit seems already to be merged in, so what is there to test? At ZenML, we have many a few Mac M1s you could use to test and verify this, and scheduling a working session with us would be easier. If you're interested please let me know at [email protected] and we can schedule it :-). We are very keen to get this supported asap |
Hi @htahir1, thanks for offering this! The review, or I should say, the guidance for how to add M1 Mac Support under current infrastructure is what we need from the Apple team. I have followed up with our TPM again and hope she could push this to happen soon. |
Just my two cents: I have (unsuccessfully) tried building
Bazel fully supports M1 with the latest build defs, so maybe it's time to migrate some of those dependencies (most of them are 16-18 months old) to newer versions if you want to support M1. |
@BrianSong Happy to test out @nicholasjng 's suggestions on our mac m1's ;-)! If you would be willing to schedule a meeting |
Good news - I have successfully built M1 wheels locally for both Python 3.9 and 3.10 on my machine, using Bazel 5.3.2. (Shoutout to @aliabbasjaffri for help with debugging.) The changes needed to accomplish this are mostly portable - I did have to modify a few build files in the process to build a valid The wheels are untested, but imports in the Python interpreter are working properly, which is a good first sign. I bumped the following dependencies in the process:
I eliminated I will write up the process here soonish when I get the time, and PR my changes if there's interest. |
Thanks @nicholasjng, this sounds great! Please feel free to send out PR for review. I will also meet with Apple team next week to get recommendations on build & test configuration, bazelrc config / setup.py settings and "future proofing" of requirements for compatibility. |
@gerilya This might be cold comfort but I managed to get access to a cloud, bare M2 Pro machine and successfully built the wheel. The machine was on The minimum steps were:
I thought it might be FWIW I checked the logs in the bazel tmp on that box, and it looks like
I can only guess that there's something in your existing build setup 😞 |
Thank you very much, @tangm! |
@gerilya Happy to help! I had another crack at it on the m2 pro machine and managed to make the build fail after upgrading from ventura 13.5 to sonoma 14.2, though it failed when building
when it was previously 14.0.3 on xcode 14.3.1 |
@tangm well, guess what? I did not have Xcode installed at all:
I have installed |
I just want to say thank you for working on this! I think there are many folks in the community that will benefit from the progress that you're making. |
Just in case you guys want to upgrade
I've cleaned up my previous PR to include just that. |
Hi @gerilya , if that helps, I'm on M2 mac too (Ventura 13.6.3) I've used commands:
while checking out your PR branch at but the build fails with errors:
I'm following this thread with interest and as Robert mentioned I'm thankful as a community user there is work ongoing to make the complete wheel buildable on Mac OSX. |
@tarilabs It looks like you are trying to build it with bazel v7.
|
@gerilya I am indeed using bazelisk and I originally thought the same, but if you notice a further down in the top of the logs, there is:
So seems to me it's using the pinned Bazel specified. Is there a different way I should operate it which you want me to try out? |
@tarilabs what does |
I have XCode Command Line Tools CLI so according to this answer, I issue:
also:
Still according to other answer my understanding to check for updates is:
but it only shows MacOS Sonoma for available updates. Out of curiosity, on which version are you on? (again, thank you all again for these efforts 🙏 ) |
@tarilabs You actually do need Xcode to be upgraded, not just the command line tools. Not familiar enough with macs to know why, but it seems the
|
Thanks @tangm , looks like I'm already on clang 15.0:
but I will try to see if fiddling with Xcode more solves... |
@tarilabs I see, that's good to know. So much for |
Thank you so much @tangm and @gerilya using Xcode (not commandlinetools) and
|
@tangm Can you share your wheels in some ways? 😃 |
@rcrowe-google @ryanpeters-google Is there anything we can do to help move #166 through to get support for apple silicon in? Happy to put in more work, but it would really help if there were some signs of progress or updates at some level. Also, tensorflow/tfx-bsl#73 and tensorflow/data-validation#251 seems like all that are needed to make tfx runnable on apple silicon, happy to @ the appropriate people to move it along |
I have found one wheel from others. Anyway, Thanks for your reply. |
Hi @tangm - Just a quick note that we are actively looking at all three PRs (166, 73, and 251). We have some system issues with testing that we're trying to work out, but we have a dependency on another team. |
@rcrowe-google Thank you for following up on this, it's heartening to hear 🙇🏻♂️🙏 |
@rcrowe-google should I bother rebasing #188, will there be any possibility of merging it? Because that PR at least makes the container build process work for |
Yes, although there will be a delay in merging it. We are actively looking at a process change that is designed to make it easier to accept PRs like that. I know that it's frustrating, and that PRs wait far too long to be merged, so we want to fix that. |
When trying to install
tfx
on a ARM-based M1 Mac, I run into problems with installingml-metadata
which is a dependency. The errors is as follows:Using
pip index versions ml-metadata
shows no matching distribution. I guess this is because there are no wheels distributed for the ARM based Macs, so I decided to install it from source as suggested on the home page as follows:python setup.py bdist_wheel
, with bazel version 5.0.0. This, however, leads to the following error:Is this a bazel version incompatibility?
--
System details:
Hardware: MacBook Pro (14-inch, 2021), Apple M1 Pro, 32 GB RAM
OS: macOS Moneterey 12.1
Bazel: 5.0.0
Python: 3.8.12
pip: 21.3.1
The text was updated successfully, but these errors were encountered: