Install FuxiCTR#

Note

The tutorial is for FuxiCTR v1.0.

FuxiCTR has the following requirements.

  • python 3.6

  • pytorch v1.0/v1.1

  • pyyaml >=5.1

  • scikit-learn

  • pandas

  • numpy

  • h5py

  • tqdm

We recommend to install the above enviornment through Anaconda using Anaconda3-5.2.0-Linux-x86_64.sh.

There are two ways to install FuxiCTR v1.0.x.

Solution 1: pip install (note that all dependent requirements need to be installed accordingly.)

!pip install fuxictr==1.0.*
Requirement already satisfied: fuxictr==1.0.* in c:\users\qiqi\anaconda3\lib\site-packages (1.0.2)
Requirement already satisfied: pandas in c:\users\qiqi\anaconda3\lib\site-packages (from fuxictr==1.0.*) (0.23.0)
Requirement already satisfied: scikit-learn in c:\users\qiqi\anaconda3\lib\site-packages (from fuxictr==1.0.*) (0.19.1)
Requirement already satisfied: h5py in c:\users\qiqi\anaconda3\lib\site-packages (from fuxictr==1.0.*) (2.7.1)
Requirement already satisfied: numpy in c:\users\qiqi\anaconda3\lib\site-packages (from fuxictr==1.0.*) (1.14.3)
Requirement already satisfied: tqdm in c:\users\qiqi\anaconda3\lib\site-packages (from fuxictr==1.0.*) (4.62.3)
Requirement already satisfied: PyYAML in c:\users\qiqi\anaconda3\lib\site-packages (from fuxictr==1.0.*) (3.12)
Requirement already satisfied: pytz>=2011k in c:\users\qiqi\anaconda3\lib\site-packages (from pandas->fuxictr==1.0.*) (2018.4)
Requirement already satisfied: python-dateutil>=2.5.0 in c:\users\qiqi\anaconda3\lib\site-packages (from pandas->fuxictr==1.0.*) (2.7.3)
Requirement already satisfied: six in c:\users\qiqi\anaconda3\lib\site-packages (from h5py->fuxictr==1.0.*) (1.11.0)
Requirement already satisfied: colorama; platform_system == "Windows" in c:\users\qiqi\anaconda3\lib\site-packages (from tqdm->fuxictr==1.0.*) (0.4.4)
distributed 1.21.8 requires msgpack, which is not installed.

Solution 2: git clone or download the zip file: https://github.com/xue-pai/FuxiCTR/archive/refs/tags/v1.0.2.zip

If you download the source code, you need to add the fuxictr folder to the system path in your code.

import sys
sys.path.append('./YOUR_PATH/fuxictr')

Check if fuxictr has been installed successfully.

import fuxictr
fuxictr.__version__
'1.0.2'

Run the tests:

!cd tests
!bash test_all.sh
!bash test_all_gpu.sh # if GPU is available