Skip to content

Commit

Permalink
Merge pull request #227 from ARGOeu/devel
Browse files Browse the repository at this point in the history
Version 3.0.0
  • Loading branch information
themiszamani authored Mar 21, 2024
2 parents f22d9ea + 677980a commit b01a025
Show file tree
Hide file tree
Showing 66 changed files with 10,103 additions and 15,645 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pipeline {
agent {
docker {
image 'node:buster'
image 'node:18-buster'
}
}
options {
Expand Down Expand Up @@ -82,4 +82,4 @@ pipeline {
}
}
}
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2022 National Infrastructures for Research and Technology - GRNET S.A.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Recommender Metrics Framework
A framework for generating statistics, metrics, KPIs, and graphs for Recommender Systems
<a href="https://eu.badgr.com/public/assertions/YWmU9yPvQxumUgd1vnPPSw">
<img src="https://api.eu.badgr.io/public/assertions/YWmU9yPvQxumUgd1vnPPSw/image" width="4%"/>
</a>

<p align="center">
<a href="https://github.com/ARGOeu/eosc-recommender-metrics/blob/ec222c3090892f33056086b8d30c18f713da519d/website/docs/static/img/flow.png">
Expand Down Expand Up @@ -55,8 +58,13 @@ A framework for generating statistics, metrics, KPIs, and graphs for Recommender
./rsmetrics.py -p athena # same procedure as the first one for 'athena' provider
```

10. A typical `rsmetrics.py` command for a monthly report, would be:
```bash
./rsmetrics.py -p provider -s $(date +"%Y-%m-01") -e $(date +"%Y-%m-%d") -t "$(date +"%B %Y")"
```

### Usage of the Streaming System
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:
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:
```bash
./rs-stream.py -a username:password -q host:port -t user_actions -d ""mongodb://localhost:27017/datastore"" -p provider_name
```
Expand Down Expand Up @@ -157,4 +165,30 @@ You can override this by editing the `.env` file inside the `/webservice` folder

_Tested with python 3.9_

#### Monitor for entries in the MongoDB collections
A typical example that counts the documents found in `user_actions`, `recommendations`, and `resources` for 1 day ago would be:
```bash
./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')"
```

E-mail send over SMTP for the above example:
```bash
./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

```

#### Export Capacity information for entries in the MongoDB collections
A typical example that counts the documents found in `user_actions`, `recommendations`, and `resources` for 1 year ago would be:
```bash
./monitor.py -d "mongodb://localhost:27017/rsmetrics" -s "$(date -u -d '1 day ago' '+%Y-%m-%d')" -e "$(date -u '+%Y-%m-%d')" --capacity
```
which will return results in CSV format of `year,month,user_actions,recommendations`

Additionally, capacity can be plotted:

```bash
./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
```

## Deployment docs
Installation and configuration documents can be found [here](docs).
6 changes: 3 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
providers:
- name: marketplace_rs
db: "mongodb://localhost:27017/recommender_dev"
- name: athena
- name: content-based engine
db: "mongodb://localhost:27017/athena_dev"
- name: online_engine
db: ""
Expand All @@ -17,12 +17,12 @@ service:
# Use the EOSC-Marketplace webpage
# to retrieve resources and associate the page_id and the service_id
store: './page_map' # or null
service_list_url: 'https://localhost/replace/with/remote/example'
service_list_url: 'https://search.marketplace.eosc-portal.eu/api/web/search-results'
# if true it keeps only published, otherwise all
# this has an effect in exporting when from is set to 'source'
# and also in metrics calculations where service is considered
published: true
category:
athena: [service]
content-based engine: [service]
marketplace_rs: [service]
online_engine: [training, data_source]
7 changes: 7 additions & 0 deletions docs/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Licence

<! --- SPDX-License-Identifier: CC-BY-4.0 -- >

## Change Log

- Initial version of this documentation.
Loading

0 comments on commit b01a025

Please sign in to comment.