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

surprise package updates #313

Merged
merged 8 commits into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ai/recommender/surprise_recommenders.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(self,
self.first_fit = True

# reader for translating btw PennAI results and Suprise training set
self.reader = Reader()
self.reader = Reader(rating_scale=(0,1))

self.ml_type = ml_type

Expand Down Expand Up @@ -224,7 +224,7 @@ def _update_training_data(self, results_data, shuffle=False):
data = Dataset.load_from_df(self.results_df[['_id',
'algorithm-parameters',
'score']],
self.reader, rating_scale=(0,1))
self.reader)
# build training set from the data
self.trainset = data.build_full_trainset()
logger.debug('self.trainset # of ML-P combos: ' +
Expand Down
2 changes: 0 additions & 2 deletions docker/lab/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ RUN apt-get update --fix-missing && apt-get install -y \
# setup python environment
COPY ${docker_filepath}/requirements.txt /root/
RUN pip install --no-cache-dir -r /root/requirements.txt
### bill's surprise fork
RUN pip install --no-cache-dir git+https://github.com/lacava/surprise.git@1.0.8.3

## Webserver

Expand Down
2 changes: 0 additions & 2 deletions docker/lab/Dockerfile_production
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ RUN apt-get update --fix-missing && apt-get install -y \
# setup python environment
COPY ${docker_filepath}/requirements.txt /root/
RUN pip install --no-cache-dir -r /root/requirements.txt
### bill's surprise fork
RUN pip install --no-cache-dir git+https://github.com/lacava/surprise.git@1.0.8.3

## Webserver

Expand Down
1 change: 1 addition & 0 deletions docker/lab/files/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ xgboost==0.82
simplejson==3.16.0
requests==2.22.0
joblib==0.16.0
-e git+https://github.com/lacava/surprise.git@1.1.1.1#egg=scikit-surprise
3 changes: 0 additions & 3 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ RUN pip install --no-cache-dir -r /root/lab_requirements.txt

COPY /docker/machine/files/requirements.txt /root/mach_requirements.txt
RUN pip install --no-cache-dir -r /root/mach_requirements.txt

### Bill's surprise fork
RUN pip install --no-cache-dir git+https://github.com/lacava/surprise.git@master
4 changes: 2 additions & 2 deletions docs/guides/Scikit_Learn_API_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ NumPy, SciPy, scikit-learn, pandas and joblib can be installed in Anaconda via t
conda install numpy scipy scikit-learn pandas joblib simplejson
```

Surprise was tweaked by William La Cava for PennAI AI engine and it can be install with `pip` via the command below. **Note: [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) is required for building the surprise package in Windows OS. Please download and run the installer with selecting "C++ Build tools". Additionally, the latest version of [`cython`](https://cython.org) is required and it can be installed/updated via `pip install --upgrade cython`.**
Surprise was tweaked for the PennAI AI engine and it can be install with `pip` via the command below. **Note: [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/) is required for building the surprise package in Windows OS. Please download and run the installer with selecting "C++ Build tools". Additionally, the latest version of [`cython`](https://cython.org) is required and it can be installed/updated via `pip install --upgrade cython`.**

```Shell
pip install --no-cache-dir git+https://github.com/lacava/surprise.git@1.0.8.3
pip install --no-cache-dir git+https://github.com/lacava/surprise.git@1.1.1.1
```

Finally to install AI engine itself, run the following command:
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ RUN pip install --no-cache-dir -r /root/lab_requirements.txt
COPY /docker/machine/files/requirements.txt /root/mach_requirements.txt
RUN pip install --no-cache-dir -r /root/mach_requirements.txt

### Bill's surprise fork
RUN pip install --no-cache-dir git+https://github.com/lacava/surprise.git@1.0.8.3


# install lab/node_modules to an anon volume
WORKDIR /appsrc/lab
COPY lab/package.json /appsrc/lab/
Expand Down