Skip to content
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

1.1.0 crash on MacOS (M2) #152

Open
rstz opened this issue Jan 7, 2023 · 6 comments
Open

1.1.0 crash on MacOS (M2) #152

rstz opened this issue Jan 7, 2023 · 6 comments
Assignees
Labels
awaiting response bug Something isn't working

Comments

@rstz
Copy link
Collaborator

rstz commented Jan 7, 2023

Hi, in my Mac (M2) VSCode crashes always when run "import tensorflow_decision_forests as tfdf". I already reinstalled tensorflow (2.11.0), tensorflow-macos (2.11.0), tensorflow-metal (0.7.0) and tensorflow_decision_forests (1.1.0). Any clue?

"Canceled future for execute_request message before replies were done
The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click here for more info. View Jupyter log for further details."

Originally posted by @mtcdultra in #16 (comment)

@rstz rstz self-assigned this Jan 7, 2023
@rstz rstz added the bug Something isn't working label Jan 7, 2023
@rstz
Copy link
Collaborator Author

rstz commented Jan 7, 2023

Hi Marcos, thank you for your report. Can you please provide more information about the python environment you're using? It sounds like you're in VSCode with an IPython / Jupyter environment, but I want to make sure in order to reproduce this

@mtcdultra
Copy link

mtcdultra commented Jan 10, 2023

Hi Richard, yes, I´m using VSCode with Jupyter environment. And on Mac terminal, tried to use iPtyhon directly and crashed again: "zsh: illegal hardware instruction ipython".

Below is the code that I've tried run:

import pandas as pd
import tensorflow as tf
import tensorflow_decision_forests as tfdf

dataset_df = pd.read_csv("SP202102.csv", encoding='ISO-8859-1')
print(dataset_df.head(3))

dataset_tf = tfdf.keras.pd_dataframe_to_tf_dataset(dataset_df, label="species")

model = tfdf.keras.RandomForestModel(compute_oob_variable_importances=True)
model.fit(x=dataset_tf)

@arnavrneo
Copy link
Contributor

Hi @mtcdultra,

Can you try downgrading the tensorflow-metal to ver 0.5.0 or lower?

@rstz
Copy link
Collaborator Author

rstz commented Jan 18, 2023

Hi, sorry for taking a bit of time to get to this. It looks like tensorflow-metal is incompatible with TF-DF at this time. This is on our Todo list, but we will need additional investigation on our side.

@mtcdultra Can you confirm that it works if you uninstall tensorflow-metal?

@Arnold1
Copy link

Arnold1 commented Feb 18, 2023

does this also apply to m1?

@rstz
Copy link
Collaborator Author

rstz commented Feb 20, 2023

Yes, TF-DF is not compatible with tensorflow-metal on M1 processors. This is a tricky issue to solve AFAICT: Normal tensorflow and tensorflow-metal have different interfaces, but TF-DF only ships a single binary per OS / processor / python version on Pypi. Any ideas are very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants