collie


Namecollie JSON
Version 1.3.1 PyPI version JSON
download
home_pagehttps://github.com/ShopRunner/collie
SummaryA PyTorch library for preparing, training, and evaluating deep learning hybrid recommender systems.
upload_time2023-03-31 16:08:28
maintainer
docs_urlNone
authorNathan Jones
requires_python>=3.6
licenseBSD-3-Clause
keywords deep learning pytorch recommender
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # collie

[![PyPI version](https://badge.fury.io/py/collie.svg)](https://badge.fury.io/py/collie)
[![versions](https://img.shields.io/pypi/pyversions/collie.svg)](https://pypi.org/project/collie/)
[![Workflows Passing](https://github.com/ShopRunner/collie/workflows/CI%2FCD/badge.svg)](https://github.com/ShopRunner/collie/actions/workflows/ci.yaml)
[![Documentation Status](https://readthedocs.org/projects/collie/badge/?version=latest)](https://collie.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/ShopRunner/collie/branch/main/graph/badge.svg)](https://codecov.io/gh/ShopRunner/collie)
[![license](https://img.shields.io/badge/License-BSD--3--Clause-blue.svg)](https://github.com/ShopRunner/collie/blob/main/LICENSE)

Collie is a library for preparing, training, and evaluating implicit deep learning hybrid recommender systems, named after the Border Collie dog breed.

Collie offers a collection of simple APIs for preparing and splitting datasets, incorporating item metadata directly into a model architecture or loss, efficiently evaluating a model's performance on the GPU, and so much more. Above all else though, Collie is built with flexibility and customization in mind, allowing for faster prototyping and experimentation.

See the [documentation](https://collie.readthedocs.io/en/latest/index.html) for more details.

![](https://net-shoprunner-scratch-data-science.s3.amazonaws.com/njones/collie/collie-banner.png)
> "We adopted 2 Border Collies a year ago and they are about 3 years old. They are completely obsessed with fetch and tennis balls and it's getting out of hand. They live in the fenced back yard and when anyone goes out there they instantly run around frantically looking for a tennis ball. If there is no ball they will just keep looking and will not let you pet them. When you do have a ball, they are 100% focused on it and will not notice anything else going on around them, like it's their whole world."
>
> -- *A Reddit thread on r/DogTraining*

## Installation
```bash
pip install collie
```

Through July 2021, this library used to be under the name ``collie_recs``. While this version is still available on PyPI, it is no longer supported or maintained. All users of the library should use ``collie`` for the latest and greatest version of the code!

## Quick Start

### Implicit Data

Creating and evaluating a matrix factorization model with _implicit_ MovieLens 100K data is simple with Collie:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ShopRunner/collie/blob/main/tutorials/quickstart.ipynb)

```python
from collie.cross_validation import stratified_split
from collie.interactions import Interactions
from collie.metrics import auc, evaluate_in_batches, mapk, mrr
from collie.model import MatrixFactorizationModel, CollieTrainer
from collie.movielens import read_movielens_df
from collie.utils import convert_to_implicit


# read in explicit MovieLens 100K data
df = read_movielens_df()

# convert the data to implicit
df_imp = convert_to_implicit(df)

# store data as ``Interactions``
interactions = Interactions(users=df_imp['user_id'],
                            items=df_imp['item_id'],
                            allow_missing_ids=True)

# perform a data split
train, val = stratified_split(interactions)

# train an implicit ``MatrixFactorization`` model
model = MatrixFactorizationModel(train=train,
                                 val=val,
                                 embedding_dim=10,
                                 lr=1e-1,
                                 loss='adaptive',
                                 optimizer='adam')
trainer = CollieTrainer(model, max_epochs=10)
trainer.fit(model)
model.eval()

# evaluate the model
auc_score, mrr_score, mapk_score = evaluate_in_batches(metric_list=[auc, mrr, mapk],
                                                       test_interactions=val,
                                                       model=model)

print(f'AUC:          {auc_score}')
print(f'MRR:          {mrr_score}')
print(f'MAP@10:       {mapk_score}')
```

More complicated examples of implicit pipelines can be viewed [for MovieLens 100K data here](https://github.com/ShopRunner/collie/blob/main/collie/movielens/run.py), [in notebooks here](https://github.com/ShopRunner/collie/tree/main/tutorials), and [documentation](https://collie.readthedocs.io/en/latest/index.html) here.

### Explicit Data

Collie also handles the situation when you instead have _explicit_ data, such as star ratings. Note how similar the pipeline and APIs are compared to the implicit example above:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ShopRunner/collie/blob/main/tutorials/quickstart-explicit.ipynb)

```python
from collie.cross_validation import stratified_split
from collie.interactions import ExplicitInteractions
from collie.metrics import explicit_evaluate_in_batches
from collie.model import MatrixFactorizationModel, CollieTrainer
from collie.movielens import read_movielens_df

from torchmetrics import MeanAbsoluteError, MeanSquaredError


# read in explicit MovieLens 100K data
df = read_movielens_df()

# store data as ``Interactions``
interactions = ExplicitInteractions(users=df['user_id'],
                                    items=df['item_id'],
                                    ratings=df['rating'])

# perform a data split
train, val = stratified_split(interactions)

# train an implicit ``MatrixFactorization`` model
model = MatrixFactorizationModel(train=train,
                                 val=val,
                                 embedding_dim=10,
                                 lr=1e-2,
                                 loss='mse',
                                 optimizer='adam')
trainer = CollieTrainer(model, max_epochs=10)
trainer.fit(model)
model.eval()

# evaluate the model
mae_score, mse_score = explicit_evaluate_in_batches(metric_list=[MeanAbsoluteError(),
                                                                 MeanSquaredError()],
                                                    test_interactions=val,
                                                    model=model)

print(f'MAE: {mae_score}')
print(f'MSE: {mse_score}')
```

## Comparison With Other Open-Source Recommendation Libraries

*On some smaller screens, you might have to scroll right to see the full table.* ➡️

| Aspect Included in Library | <a href="http://surpriselib.com" target="_blank">Surprise</a> | <a href="https://making.lyst.com/lightfm/docs/home.html" target="_blank">LightFM</a> | <a href="https://docs.fast.ai" target="_blank">FastAI</a> | <a href="https://maciejkula.github.io/spotlight/" target="_blank">Spotlight</a> | <a href="https://recbole.io" target="_blank">RecBole</a> | <a href="https://www.tensorflow.org/recommenders" target="_blank">TensorFlow Recommenders</a> | Collie |
| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| **Implicit data support** for when we only know when a user interacts with an item or not, not the explicit rating the user gave the item |  | ✓ |  | ✓ | ✓ | ✓ | ✓ |
| **Explicit data support** for when we know the explicit rating the user gave the item | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Support for **side-data** incorporated directly into the models |  | ✓ |  |  | ✓ | ✓ | ✓ |
| Support a **flexible framework for new model architectures** and experimentation |  |  | ✓ | ✓ | ✓ | ✓ | ✓ |
| **Deep learning** libraries utilizing speed-ups with a GPU and able to implement new, cutting-edge deep learning algorithms  |  |  | ✓ | ✓ | ✓ | ✓ | ✓ |
| **Automatic support for multi-GPU training**  |  |  |  |  |  |  | ✓ |
| **Actively supported and maintained**  | ✓ | ✓ | ✓ |  | ✓ | ✓ | ✓ |
| **Type annotations** for classes, methods, and functions  |  |  |  |  |  | ✓ | ✓ |
| **Scalable for larger, out-of-memory datasets**  |  |  |  |  |  | ✓ | ✓ |
| Includes **model zoo** with two or more model architectures implemented  |  |  |  | ✓ | ✓ |  | ✓ |
| Includes **implicit loss functions** for training and **metric functions** for model evaluation  |  | ✓ |  | ✓ | ✓ |  | ✓ |
| Includes **adaptive loss functions** for multiple negative examples  |  | ✓ |  | ✓ |  |  | ✓ |
| Includes **loss functions with [partial credit for side-data](https://collie.readthedocs.io/en/latest/loss.html)**  |  |  |  |  |  |  | ✓ |

The following table notes shows the results of an experiment training and evaluating recommendation models in some popular implicit recommendation model frameworks on a common [MovieLens 10M](https://grouplens.org/datasets/movielens/10m/) dataset. The data was split via a 90/5/5 stratified data split. Each model was trained for a maximum of 40 epochs using an embedding dimension of 32. For each model, we used default hyperparameters (unless otherwise noted below).

| Model | MAP@10 Score | Notes |
| ----- | :----------: | :---: |
| Randomly initialized, untrained model                                     | 0.0001     |                                       |
| [Logistic MF](https://implicit.readthedocs.io/en/latest/lmf.html)         | 0.0128     | Using the CUDA implementation.        |
| [LightFM](https://making.lyst.com/lightfm/docs/home.html) with BPR Loss   | 0.0180     |                                       |
| [ALS](https://implicit.readthedocs.io/en/latest/als.html)                 | 0.0189     | Using the CUDA implementation.        |
| [BPR](https://implicit.readthedocs.io/en/latest/bpr.html)                 | 0.0301     | Using the CUDA implementation.        |
| [Spotlight](https://maciejkula.github.io/spotlight/index.html)            | 0.0376     | Using adaptive hinge loss.            |
| [LightFM](https://making.lyst.com/lightfm/docs/home.html) with WARP Loss  | 0.0412     |                                       |
| Collie ``MatrixFactorizationModel``                                       | **0.0425** | Using a separate SGD bias optimizer.  |

At ShopRunner, we have found Collie models outperform comparable LightFM models with up to **64% improved MAP@10 scores**.

## Development
To run locally, begin by creating a data path environment variable:

```bash
# Define where on your local hard drive you want to store data. It is best if this
# location is not inside the repo itself. An example is below
export DATA_PATH=$HOME/data/collie
```

Run development from within the Docker container:
```bash
docker build -t collie .

# run the container in interactive mode, leaving port ``8888`` open for Jupyter
docker run \
    -it \
    --rm \
    -v "${DATA_PATH}:/collie/data/" \
    -v "${PWD}:/collie" \
    -p 8888:8888 \
    collie /bin/bash
```

### Run on a GPU:
```bash
docker build -t collie .

# run the container in interactive mode, leaving port ``8888`` open for Jupyter
docker run \
    -it \
    --rm \
    --gpus all \
    -v "${DATA_PATH}:/collie/data/" \
    -v "${PWD}:/collie" \
    -p 8888:8888 \
    collie /bin/bash
```

### Start JupyterLab
To run JupyterLab, start the container and execute the following:
```bash
jupyter lab --ip 0.0.0.0 --no-browser --allow-root
```
Connect to JupyterLab here: [http://localhost:8888/lab](http://localhost:8888/lab)

### Unit Tests
Library unit tests in this repo are to be run in the Docker container:

```bash
# execute unit tests
pytest --cov-report term --cov=collie
```

Note that a handful of tests require the [MovieLens 100K dataset](https://files.grouplens.org/datasets/movielens/ml-100k.zip) to be downloaded (~5MB in size), meaning that either before or during test time, there will need to be an internet connection. This dataset only needs to be downloaded a single time for use in both unit tests and tutorials.

### Docs
The Collie library supports Read the Docs documentation. To compile locally,
```bash
cd docs
make html

# open local docs
open build/html/index.html
```



License
-------
Copyright (c) 2021 ShopRunner, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ShopRunner/collie",
    "name": "collie",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "deep learning,pytorch,recommender",
    "author": "Nathan Jones",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/87/0f/5408acad50416f9fae5a63125e450ea42e36562cbcb1c1f3a8c13ac1b07c/collie-1.3.1.tar.gz",
    "platform": null,
    "description": "# collie\n\n[![PyPI version](https://badge.fury.io/py/collie.svg)](https://badge.fury.io/py/collie)\n[![versions](https://img.shields.io/pypi/pyversions/collie.svg)](https://pypi.org/project/collie/)\n[![Workflows Passing](https://github.com/ShopRunner/collie/workflows/CI%2FCD/badge.svg)](https://github.com/ShopRunner/collie/actions/workflows/ci.yaml)\n[![Documentation Status](https://readthedocs.org/projects/collie/badge/?version=latest)](https://collie.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/ShopRunner/collie/branch/main/graph/badge.svg)](https://codecov.io/gh/ShopRunner/collie)\n[![license](https://img.shields.io/badge/License-BSD--3--Clause-blue.svg)](https://github.com/ShopRunner/collie/blob/main/LICENSE)\n\nCollie is a library for preparing, training, and evaluating implicit deep learning hybrid recommender systems, named after the Border Collie dog breed.\n\nCollie offers a collection of simple APIs for preparing and splitting datasets, incorporating item metadata directly into a model architecture or loss, efficiently evaluating a model's performance on the GPU, and so much more. Above all else though, Collie is built with flexibility and customization in mind, allowing for faster prototyping and experimentation.\n\nSee the [documentation](https://collie.readthedocs.io/en/latest/index.html) for more details.\n\n![](https://net-shoprunner-scratch-data-science.s3.amazonaws.com/njones/collie/collie-banner.png)\n> \"We adopted 2 Border Collies a year ago and they are about 3 years old. They are completely obsessed with fetch and tennis balls and it's getting out of hand. They live in the fenced back yard and when anyone goes out there they instantly run around frantically looking for a tennis ball. If there is no ball they will just keep looking and will not let you pet them. When you do have a ball, they are 100% focused on it and will not notice anything else going on around them, like it's their whole world.\"\n>\n> -- *A Reddit thread on r/DogTraining*\n\n## Installation\n```bash\npip install collie\n```\n\nThrough July 2021, this library used to be under the name ``collie_recs``. While this version is still available on PyPI, it is no longer supported or maintained. All users of the library should use ``collie`` for the latest and greatest version of the code!\n\n## Quick Start\n\n### Implicit Data\n\nCreating and evaluating a matrix factorization model with _implicit_ MovieLens 100K data is simple with Collie:\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ShopRunner/collie/blob/main/tutorials/quickstart.ipynb)\n\n```python\nfrom collie.cross_validation import stratified_split\nfrom collie.interactions import Interactions\nfrom collie.metrics import auc, evaluate_in_batches, mapk, mrr\nfrom collie.model import MatrixFactorizationModel, CollieTrainer\nfrom collie.movielens import read_movielens_df\nfrom collie.utils import convert_to_implicit\n\n\n# read in explicit MovieLens 100K data\ndf = read_movielens_df()\n\n# convert the data to implicit\ndf_imp = convert_to_implicit(df)\n\n# store data as ``Interactions``\ninteractions = Interactions(users=df_imp['user_id'],\n                            items=df_imp['item_id'],\n                            allow_missing_ids=True)\n\n# perform a data split\ntrain, val = stratified_split(interactions)\n\n# train an implicit ``MatrixFactorization`` model\nmodel = MatrixFactorizationModel(train=train,\n                                 val=val,\n                                 embedding_dim=10,\n                                 lr=1e-1,\n                                 loss='adaptive',\n                                 optimizer='adam')\ntrainer = CollieTrainer(model, max_epochs=10)\ntrainer.fit(model)\nmodel.eval()\n\n# evaluate the model\nauc_score, mrr_score, mapk_score = evaluate_in_batches(metric_list=[auc, mrr, mapk],\n                                                       test_interactions=val,\n                                                       model=model)\n\nprint(f'AUC:          {auc_score}')\nprint(f'MRR:          {mrr_score}')\nprint(f'MAP@10:       {mapk_score}')\n```\n\nMore complicated examples of implicit pipelines can be viewed [for MovieLens 100K data here](https://github.com/ShopRunner/collie/blob/main/collie/movielens/run.py), [in notebooks here](https://github.com/ShopRunner/collie/tree/main/tutorials), and [documentation](https://collie.readthedocs.io/en/latest/index.html) here.\n\n### Explicit Data\n\nCollie also handles the situation when you instead have _explicit_ data, such as star ratings. Note how similar the pipeline and APIs are compared to the implicit example above:\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ShopRunner/collie/blob/main/tutorials/quickstart-explicit.ipynb)\n\n```python\nfrom collie.cross_validation import stratified_split\nfrom collie.interactions import ExplicitInteractions\nfrom collie.metrics import explicit_evaluate_in_batches\nfrom collie.model import MatrixFactorizationModel, CollieTrainer\nfrom collie.movielens import read_movielens_df\n\nfrom torchmetrics import MeanAbsoluteError, MeanSquaredError\n\n\n# read in explicit MovieLens 100K data\ndf = read_movielens_df()\n\n# store data as ``Interactions``\ninteractions = ExplicitInteractions(users=df['user_id'],\n                                    items=df['item_id'],\n                                    ratings=df['rating'])\n\n# perform a data split\ntrain, val = stratified_split(interactions)\n\n# train an implicit ``MatrixFactorization`` model\nmodel = MatrixFactorizationModel(train=train,\n                                 val=val,\n                                 embedding_dim=10,\n                                 lr=1e-2,\n                                 loss='mse',\n                                 optimizer='adam')\ntrainer = CollieTrainer(model, max_epochs=10)\ntrainer.fit(model)\nmodel.eval()\n\n# evaluate the model\nmae_score, mse_score = explicit_evaluate_in_batches(metric_list=[MeanAbsoluteError(),\n                                                                 MeanSquaredError()],\n                                                    test_interactions=val,\n                                                    model=model)\n\nprint(f'MAE: {mae_score}')\nprint(f'MSE: {mse_score}')\n```\n\n## Comparison With Other Open-Source Recommendation Libraries\n\n*On some smaller screens, you might have to scroll right to see the full table.* \u27a1\ufe0f\n\n| Aspect Included in Library | <a href=\"http://surpriselib.com\" target=\"_blank\">Surprise</a> | <a href=\"https://making.lyst.com/lightfm/docs/home.html\" target=\"_blank\">LightFM</a> | <a href=\"https://docs.fast.ai\" target=\"_blank\">FastAI</a> | <a href=\"https://maciejkula.github.io/spotlight/\" target=\"_blank\">Spotlight</a> | <a href=\"https://recbole.io\" target=\"_blank\">RecBole</a> | <a href=\"https://www.tensorflow.org/recommenders\" target=\"_blank\">TensorFlow Recommenders</a> | Collie |\n| --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: |\n| **Implicit data support** for when we only know when a user interacts with an item or not, not the explicit rating the user gave the item |  | \u2713 |  | \u2713 | \u2713 | \u2713 | \u2713 |\n| **Explicit data support** for when we know the explicit rating the user gave the item | \u2713 | \u2713 | \u2713 | \u2713 | \u2713 | \u2713 | \u2713 |\n| Support for **side-data** incorporated directly into the models |  | \u2713 |  |  | \u2713 | \u2713 | \u2713 |\n| Support a **flexible framework for new model architectures** and experimentation |  |  | \u2713 | \u2713 | \u2713 | \u2713 | \u2713 |\n| **Deep learning** libraries utilizing speed-ups with a GPU and able to implement new, cutting-edge deep learning algorithms  |  |  | \u2713 | \u2713 | \u2713 | \u2713 | \u2713 |\n| **Automatic support for multi-GPU training**  |  |  |  |  |  |  | \u2713 |\n| **Actively supported and maintained**  | \u2713 | \u2713 | \u2713 |  | \u2713 | \u2713 | \u2713 |\n| **Type annotations** for classes, methods, and functions  |  |  |  |  |  | \u2713 | \u2713 |\n| **Scalable for larger, out-of-memory datasets**  |  |  |  |  |  | \u2713 | \u2713 |\n| Includes **model zoo** with two or more model architectures implemented  |  |  |  | \u2713 | \u2713 |  | \u2713 |\n| Includes **implicit loss functions** for training and **metric functions** for model evaluation  |  | \u2713 |  | \u2713 | \u2713 |  | \u2713 |\n| Includes **adaptive loss functions** for multiple negative examples  |  | \u2713 |  | \u2713 |  |  | \u2713 |\n| Includes **loss functions with [partial credit for side-data](https://collie.readthedocs.io/en/latest/loss.html)**  |  |  |  |  |  |  | \u2713 |\n\nThe following table notes shows the results of an experiment training and evaluating recommendation models in some popular implicit recommendation model frameworks on a common [MovieLens 10M](https://grouplens.org/datasets/movielens/10m/) dataset. The data was split via a 90/5/5 stratified data split. Each model was trained for a maximum of 40 epochs using an embedding dimension of 32. For each model, we used default hyperparameters (unless otherwise noted below).\n\n| Model | MAP@10 Score | Notes |\n| ----- | :----------: | :---: |\n| Randomly initialized, untrained model                                     | 0.0001     |                                       |\n| [Logistic MF](https://implicit.readthedocs.io/en/latest/lmf.html)         | 0.0128     | Using the CUDA implementation.        |\n| [LightFM](https://making.lyst.com/lightfm/docs/home.html) with BPR Loss   | 0.0180     |                                       |\n| [ALS](https://implicit.readthedocs.io/en/latest/als.html)                 | 0.0189     | Using the CUDA implementation.        |\n| [BPR](https://implicit.readthedocs.io/en/latest/bpr.html)                 | 0.0301     | Using the CUDA implementation.        |\n| [Spotlight](https://maciejkula.github.io/spotlight/index.html)            | 0.0376     | Using adaptive hinge loss.            |\n| [LightFM](https://making.lyst.com/lightfm/docs/home.html) with WARP Loss  | 0.0412     |                                       |\n| Collie ``MatrixFactorizationModel``                                       | **0.0425** | Using a separate SGD bias optimizer.  |\n\nAt ShopRunner, we have found Collie models outperform comparable LightFM models with up to **64% improved MAP@10 scores**.\n\n## Development\nTo run locally, begin by creating a data path environment variable:\n\n```bash\n# Define where on your local hard drive you want to store data. It is best if this\n# location is not inside the repo itself. An example is below\nexport DATA_PATH=$HOME/data/collie\n```\n\nRun development from within the Docker container:\n```bash\ndocker build -t collie .\n\n# run the container in interactive mode, leaving port ``8888`` open for Jupyter\ndocker run \\\n    -it \\\n    --rm \\\n    -v \"${DATA_PATH}:/collie/data/\" \\\n    -v \"${PWD}:/collie\" \\\n    -p 8888:8888 \\\n    collie /bin/bash\n```\n\n### Run on a GPU:\n```bash\ndocker build -t collie .\n\n# run the container in interactive mode, leaving port ``8888`` open for Jupyter\ndocker run \\\n    -it \\\n    --rm \\\n    --gpus all \\\n    -v \"${DATA_PATH}:/collie/data/\" \\\n    -v \"${PWD}:/collie\" \\\n    -p 8888:8888 \\\n    collie /bin/bash\n```\n\n### Start JupyterLab\nTo run JupyterLab, start the container and execute the following:\n```bash\njupyter lab --ip 0.0.0.0 --no-browser --allow-root\n```\nConnect to JupyterLab here: [http://localhost:8888/lab](http://localhost:8888/lab)\n\n### Unit Tests\nLibrary unit tests in this repo are to be run in the Docker container:\n\n```bash\n# execute unit tests\npytest --cov-report term --cov=collie\n```\n\nNote that a handful of tests require the [MovieLens 100K dataset](https://files.grouplens.org/datasets/movielens/ml-100k.zip) to be downloaded (~5MB in size), meaning that either before or during test time, there will need to be an internet connection. This dataset only needs to be downloaded a single time for use in both unit tests and tutorials.\n\n### Docs\nThe Collie library supports Read the Docs documentation. To compile locally,\n```bash\ncd docs\nmake html\n\n# open local docs\nopen build/html/index.html\n```\n\n\n\nLicense\n-------\nCopyright (c) 2021 ShopRunner, Inc.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "A PyTorch library for preparing, training, and evaluating deep learning hybrid recommender systems.",
    "version": "1.3.1",
    "split_keywords": [
        "deep learning",
        "pytorch",
        "recommender"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f7aeb454f1729cf8dba71b208d249d9afc3f8524911433c91bbd4bc63894fc0",
                "md5": "bec8c613db5ba894d8eeb9d21294e53f",
                "sha256": "68f4beac162d04f55980efb6668c7bb63c03e0c89262a2373445b94430df8f88"
            },
            "downloads": -1,
            "filename": "collie-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bec8c613db5ba894d8eeb9d21294e53f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 106270,
            "upload_time": "2023-03-31T16:08:25",
            "upload_time_iso_8601": "2023-03-31T16:08:25.114688Z",
            "url": "https://files.pythonhosted.org/packages/1f/7a/eb454f1729cf8dba71b208d249d9afc3f8524911433c91bbd4bc63894fc0/collie-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "870f5408acad50416f9fae5a63125e450ea42e36562cbcb1c1f3a8c13ac1b07c",
                "md5": "f415396c8efaf546d1d2bca68d2ca498",
                "sha256": "57f2314c6aef359e65799ea8034412f014c057683289e61800ecec0a53928813"
            },
            "downloads": -1,
            "filename": "collie-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f415396c8efaf546d1d2bca68d2ca498",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 81042,
            "upload_time": "2023-03-31T16:08:28",
            "upload_time_iso_8601": "2023-03-31T16:08:28.321331Z",
            "url": "https://files.pythonhosted.org/packages/87/0f/5408acad50416f9fae5a63125e450ea42e36562cbcb1c1f3a8c13ac1b07c/collie-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-31 16:08:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ShopRunner",
    "github_project": "collie",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "collie"
}
        
Elapsed time: 0.12092s