|
1 | 1 | # Recommender Metrics Framework |
2 | 2 | A framework for generating statistics, metrics, KPIs, and graphs for Recommender Systems |
| 3 | +<a href="https://eu.badgr.com/public/assertions/YWmU9yPvQxumUgd1vnPPSw"> |
| 4 | +<img src="https://api.eu.badgr.io/public/assertions/YWmU9yPvQxumUgd1vnPPSw/image" width="4%"/> |
| 5 | +</a> |
3 | 6 |
|
4 | 7 | <p align="center"> |
5 | 8 | <a href="https://github.com/ARGOeu/eosc-recommender-metrics/blob/ec222c3090892f33056086b8d30c18f713da519d/website/docs/static/img/flow.png"> |
@@ -55,8 +58,13 @@ A framework for generating statistics, metrics, KPIs, and graphs for Recommender |
55 | 58 | ./rsmetrics.py -p athena # same procedure as the first one for 'athena' provider |
56 | 59 | ``` |
57 | 60 |
|
| 61 | +10. A typical `rsmetrics.py` command for a monthly report, would be: |
| 62 | +```bash |
| 63 | +./rsmetrics.py -p provider -s $(date +"%Y-%m-01") -e $(date +"%Y-%m-%d") -t "$(date +"%B %Y")" |
| 64 | +``` |
| 65 | + |
58 | 66 | ### Usage of the Streaming System |
59 | | -10. Run from terminal `./rs-stream.py` in order to listen to the stream for new data, process them, and store them in the `Datastore`, concerning that particular provider: |
| 67 | +11. Run from terminal `./rs-stream.py` in order to listen to the stream for new data, process them, and store them in the `Datastore`, concerning that particular provider: |
60 | 68 | ```bash |
61 | 69 | ./rs-stream.py -a username:password -q host:port -t user_actions -d ""mongodb://localhost:27017/datastore"" -p provider_name |
62 | 70 | ``` |
@@ -157,4 +165,30 @@ You can override this by editing the `.env` file inside the `/webservice` folder |
157 | 165 |
|
158 | 166 | _Tested with python 3.9_ |
159 | 167 |
|
| 168 | +#### Monitor for entries in the MongoDB collections |
| 169 | +A typical example that counts the documents found in `user_actions`, `recommendations`, and `resources` for 1 day ago would be: |
| 170 | +```bash |
| 171 | +./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')" |
| 172 | +``` |
| 173 | + |
| 174 | +E-mail send over SMTP for the above example: |
| 175 | +```bash |
| 176 | +./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')" --email "smtp://server:port" sender@domain recipient1@domain recipient2@domain |
| 177 | + |
| 178 | +``` |
| 179 | + |
| 180 | +#### Export Capacity information for entries in the MongoDB collections |
| 181 | +A typical example that counts the documents found in `user_actions`, `recommendations`, and `resources` for 1 year ago would be: |
| 182 | +```bash |
| 183 | +./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')" --capacity |
| 184 | +``` |
| 185 | +which will return results in CSV format of `year,month,user_actions,recommendations` |
| 186 | + |
| 187 | +Additionally, capacity can be plotted: |
| 188 | + |
| 189 | +```bash |
| 190 | +./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')" --capacity --plot |
| 191 | +``` |
160 | 192 |
|
| 193 | +## Deployment docs |
| 194 | +Installation and configuration documents can be found [here](docs). |
0 commit comments