forked from pytorch/vision
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recommendation working with expanded dataset (pytorch#251)
* Recommendation working with expanded dataset This code is the proposal for the new reference implementation of the recommendation benchmark. It works on the expanded ML-20M dataset (16x more users, 32x more items) generated with the code from data_generation directory. * switched to pytorch/pytorch container, README updated
- Loading branch information
Showing
18 changed files
with
594 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DATASET=${DATASET:-ml-20m} | ||
USER_MUL=${USER_MUL:-16} | ||
ITEM_MUL=${ITEM_MUL:-32} | ||
DATA_DIR=${DATA_DIR:-/data/cache} | ||
|
||
DATA_PATH=${DATA_DIR}/${DATASET}x${USER_MUL}x${ITEM_MUL}/ | ||
|
||
mkdir -p ${DATA_PATH} | ||
python run_expansion.py --input_csv_file ${DATA_DIR}/${DATASET}/ratings.csv --num_row_multiplier ${USER_MUL} --num_col_multiplier ${ITEM_MUL} --output_prefix ${DATA_PATH} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
numpy | ||
absl-py | ||
pandas | ||
scipy | ||
scikit-image | ||
sklearn | ||
tensorflow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,16 @@ | ||
FROM nvidia/cuda:9.1-cudnn7-devel-ubuntu16.04 | ||
ARG FROM_IMAGE_NAME=pytorch/pytorch:1.0.1-cuda10.0-cudnn7-runtime | ||
FROM ${FROM_IMAGE_NAME} | ||
|
||
# Set working directory | ||
WORKDIR /mlperf | ||
# Install Python dependencies | ||
WORKDIR /workspace/recommendation | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y git make build-essential libssl-dev zlib1g-dev libbz2-dev \ | ||
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | ||
xz-utils tk-dev cmake unzip | ||
|
||
# pyenv Install | ||
RUN git clone https://github.com/pyenv/pyenv.git .pyenv | ||
|
||
ENV HOME /mlperf | ||
ENV PYENV_ROOT $HOME/.pyenv | ||
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH | ||
|
||
# Install Anaconda | ||
RUN PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install anaconda3-5.0.1 | ||
RUN pyenv rehash | ||
RUN pyenv global anaconda3-5.0.1 | ||
|
||
# Install PyTorch Requirements | ||
ENV CMAKE_PREFIX_PATH "$(dirname $(which conda))/../" | ||
RUN conda install -y numpy pyyaml mkl mkl-include setuptools cmake cffi typing | ||
RUN conda install -c pytorch -y magma-cuda90 | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt | ||
|
||
# Install PyTorch | ||
RUN mkdir github | ||
WORKDIR /mlperf/github | ||
RUN git clone --recursive https://github.com/pytorch/pytorch | ||
WORKDIR /mlperf/github/pytorch | ||
RUN git checkout v0.4.0 | ||
RUN git submodule update --init | ||
RUN python setup.py clean | ||
COPY negative_sampling_cpp ./negative_sampling_cpp | ||
WORKDIR /workspace/recommendation/negative_sampling_cpp | ||
RUN python setup.py install | ||
|
||
# Install ncf-pytorch | ||
WORKDIR /mlperf/ncf | ||
# TODO: Change to clone github repo | ||
ADD . /mlperf/ncf | ||
RUN pip install -r requirements.txt | ||
WORKDIR /mlperf/experiment | ||
ENTRYPOINT ["/mlperf/ncf/run_and_time.sh"] | ||
# Copy NCF code and build | ||
WORKDIR /workspace/recommendation | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.