shenweichen / DeepCTR-Torch

【PyTorch】Easy-to-use,Modular and Extendible package of deep-learning based CTR models.
https://deepctr-torch.readthedocs.io/en/latest/index.html
Apache License 2.0
2.95k stars 696 forks source link

Issues installing deeptorch >0.2.2 for M1 macos #265

Open johanneskruse opened 1 year ago

johanneskruse commented 1 year ago

I'm trying to install your package, however, versions (0.2.2>) does not support the Macos with M1 chip.

Currently the following is required; REQUIRED_PACKAGES = ['torch>=1.2.0', 'tqdm', 'scikit-learn', 'tensorflow']

But for installing tensorflow for M1 I need to install:

Looking at version deepctr-torch==0.2.2, the following is required: REQUIRED_PACKAGES = ['torch>=1.1.0', 'tqdm', 'sklearn']

Futhermore, for an 'torch' implementation, why is the tensorflow needed?

The package is great, and I hope you can help resolved the issue

johanneskruse commented 1 year ago

I found the following solution:

Installing without any dependencies, and then installing each package manually ( using 'pip install tensorflow-macos' )

I am not sure if it is possible to have that in the setup file but for any other M1 users, this is a work around that worked for me.

aobangli commented 1 year ago

Thanks for your solution! It works on my MacBookAir with M1 chip! By the way, it seems that tensorflow callback is applied during training, actually I don't really need this if I have to install tensorflow, especially in a pytorch version of the package.