Skip to content

Commit e711be6

Browse files
authored
Develop (#22)
* GHA action changes: * Run wheel build only when pushed to master or release created. * use pre-commit instead of mypy alone. * Rename workflows * Separage optimization and optuna study creation. * Fixing for pre-commit check. * Add some docs. * Abolish BaseRecommenderWithThreadingSupport.
1 parent a76aabd commit e711be6

File tree

22 files changed

+142
-188
lines changed

22 files changed

+142
-188
lines changed

.github/workflows/mypy-check.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/pre-commit.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: pre-commit
2+
on:
3+
pull_request:
4+
push:
5+
jobs:
6+
pre-commit:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
- uses: pre-commit/[email protected]

.github/workflows/main.yml renamed to .github/workflows/run-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Full Test & Upload coverage
2-
on: [push]
2+
on: [push, pull_request]
33
jobs:
44
run_pytest_upload_coverage:
55
runs-on: ubuntu-latest

.github/workflows/wheels.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
name: Build
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- main
6+
release:
7+
types:
8+
- created
39
jobs:
410
build_sdist:
511
name: Build source distribution

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
1212
include(CPack)
1313

1414
add_subdirectory(pybind11)
15-
#pybind11_add_module(_ials cpp_source/als/wrapper.cpp)
16-
pybind11_add_module(_knn cpp_source/knn/wrapper.cpp)
15+
pybind11_add_module(irspack.recommenders._ials cpp_source/als/wrapper.cpp)
16+
pybind11_add_module(irspack.recommenders._knn cpp_source/knn/wrapper.cpp)
1717
pybind11_add_module(irspack.utils._util_cpp cpp_source/util.cpp)
18-
18+
pybind11_add_module(irspack._evapuator cpp_source/evaluator.cpp)
19+
pybind11_add_module(irspack._rwr cpp_source/rws.cpp)

Dockerfile

Lines changed: 0 additions & 47 deletions
This file was deleted.

Readme.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@
33
[![Python](https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue)](https://www.python.org)
44
[![pypi](https://img.shields.io/pypi/v/irspack.svg)](https://pypi.python.org/pypi/irspack)
55
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/tohtsky/irspack)
6+
[![Build](https://github.com/tohtsky/irspack/workflows/Build/badge.svg?branch=main)](https://github.com/tohtsky/irspack)
67
[![Read the Docs](https://readthedocs.org/projects/irspack/badge/?version=stable)](https://irspack.readthedocs.io/en/stable/)
78
[![codecov](https://codecov.io/gh/tohtsky/irspack/branch/main/graph/badge.svg?token=kLgOKTQqcV)](https://codecov.io/gh/tohtsky/irspack)
89

9-
**irspack** is a Python package to train, evaluate, and optimize recommender systems based on implicit feedback.
10+
**irspack** is a Python package for train, evaluate, and optimize recommender systems based on implicit feedback.
1011

11-
While there are already many other great packages for this purpose, like
12+
There are already great packages for this purpose like
1213

1314
- [implicit](https://github.com/benfred/implicit)
1415
- [daisyRec](https://github.com/AmazingDD/daisyRec)
1516
- [RecSys2019_DeepLearning_Evaluation](https://github.com/MaurizioFD/RecSys2019_DeepLearning_Evaluation) (which has influenced this project the most)
1617

17-
I have decided to implement my own one to
18+
However, I decided to implement my own one to
1819

1920
- Use [optuna](https://github.com/optuna/optuna) for more efficient parameter search. In particular, if an early stopping scheme is available, optuna can prune unpromising trial based on the intermediate validation score, which drastically reduces overall running time for tuning.
2021
- Use multi-threaded implementations of the number of algorithms (KNN and IALS) in C++.
21-
- Deal with user cold-start scenarios using [CB2CF strategy](https://dl.acm.org/doi/10.1145/3298689.3347038), which I found very convenient in practice.
22+
- Deal with user cold-start scenarios using ["CB2CF" strategy](https://dl.acm.org/doi/10.1145/3298689.3347038), which I found very convenient in practice.
2223

2324
# Installation & Optional Dependencies
2425

@@ -38,7 +39,7 @@ In that case, you must have a decent version of C++ compiler (with C++11 support
3839

3940
## Optional Dependencies
4041

41-
I have also prepared a wrapper class (`BPRFMRecommender`) to train and optimize BPR/warp loss Matrix factorization implemented in [lightfm](https://github.com/lyst/lightfm). To use it you have to install `lightfm` separately by e.g.,
42+
I have also prepared a wrapper class (`BPRFMRecommender`) to train and optimize BPR/warp loss Matrix factorization implemented in [lightfm](https://github.com/lyst/lightfm). To use it you have to install `lightfm` separately, e.g. by
4243

4344
```sh
4445
pip install lightfm

cpp_source/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ PYBIND11_MODULE(_util_cpp, m) {
2323
py::arg("X"), py::arg("k1") = 1.2, py::arg("b") = 0.75);
2424
m.def("tf_idf_weight", &sparse_util::tf_idf_weight<double>, py::arg("X"),
2525
py::arg("smooth") = true);
26-
}
26+
}

docker-compose.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/source/api_reference.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ Optimizers
7777

7878
.. currentmodule:: irspack.split
7979

80-
SplitFunctions
81-
--------------
80+
Split Functions
81+
---------------
8282
.. autosummary::
8383
:toctree: api_reference
8484
:nosignatures:

0 commit comments

Comments
 (0)