-
Notifications
You must be signed in to change notification settings - Fork 716
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
Mac M1: jnitensorflow
error with BertEmbeddings.pretrained
#13079
Comments
Hi @rwoodard-prog, Thanks for reporting this, M1 support is still experimental and it is always good to iron out these issues. I was trying to recreate it (On my 2020 M1 MacBook Air) but for me in even with Could you please provide me with the following information:
|
Thank you for the quick reply and for helping with this. I would not be surprised if it is a classpath thing--that world is always a bit murky for me. Here is more info:
Some poking into the
I do not think the following matters, but b/c of some network settings on my local and some protobuf issues, the actual command I use to run spark is:
|
Huge help to @DevinTDHa over Slack. Thank you! The problem was my Above, I showed that my
But since I have
So I corrected that:
That did not solve the problem, though. @DevinTDHa suggested I install sdkman. I did that and then installed the
Since I want to use large embeddings models, I need to allocate the driver memory when I start
Success:
And there was much rejoicing! Thank you, @DevinTDHa, and JSL. |
Thanks for providing this information here @rwoodard-prog I appreciate it. @DevinTDHa Could you please add these to our docs here if something is missing? https://nlp.johnsnowlabs.com/docs/en/install#installation-for-m1-macs Many thanks |
I'm using M3. I added the following dependency to my POM dependency And it works like a charm. |
Thanks for the update! It seems the base M1, M2, and M3 are fine with the correct configuration and Java, but the variations like Pro, Max, and Ultra are not the same build and they fail. |
(BTW, JSL team does great work--thank you!)
Description
On Mac M1,
BertEmbeddings.pretrained()
crashes with error:I recognize that Tensorflow and SparkNLP on Mac M1 is a long, ongoing discussion and I have read many, many online posts, issues, PRs, etc. I am posting this issue because JSL installation instructions imply that all should work on a Mac M1. I am hoping to consolidate and clarify discussions in this issue.
Is it truly a bug or just one slightly wrong java/scala/spark/JSL env var for me?
I cross posted this issue w/ a known working JSL demo project at maziyarpanahi/spark-nlp-starter#1.
Thank you for any help with this.
Expected Behavior
It should not crash.
Current Behavior
Startup:
Code:
Possible Solution
Steps to Reproduce
Context
I want to develop and test w/ an IDE on local Mac M1 then deploy to Databricks.
Your Environment
Hardware:
Software:
The text was updated successfully, but these errors were encountered: