Skip to content

Commit fef7e69

Browse files
authored
Merge pull request #183 from ARGOeu/devel
New Version
2 parents ec222c3 + b7401c1 commit fef7e69

32 files changed

+1908
-1601
lines changed

README.md

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
1-
# eosc-recommender-metrics
1+
# Recommender Metrics Framework
2+
A framework for generating statistics, metrics, KPIs, and graphs for Recommender Systems
23

3-
A framework for counting the recommender metrics
4+
<p align="center">
5+
<a href="https://github.com/ARGOeu/eosc-recommender-metrics/blob/ec222c3090892f33056086b8d30c18f713da519d/website/docs/static/img/flow.png">
6+
<img src="website/docs/static/img/flow.png" width="70%"/>
7+
</a>
8+
</p>
49

5-
## Preprocessor v.0.2
10+
11+
## Preprocessor
612

713
<p align="center">
8-
<a href="https://github.com/nikosT/eosc-recommender-metrics/blob/master/docs/Preprocessor.png">
9-
<img src="https://github.com/nikosT/eosc-recommender-metrics/blob/master/docs/Preprocessor.png" width="70%"/>
14+
<a href="https://github.com/ARGOeu/eosc-recommender-metrics/blob/ec222c3090892f33056086b8d30c18f713da519d/website/docs/static/img/preprocessor.png">
15+
<img src="website/docs/static/img/preprocessor.png" width="70%"/>
1016
</a>
1117
</p>
1218

13-
## RS metrics v.0.2
19+
## RS metrics
1420

1521
<p align="center">
16-
<a href="https://github.com/nikosT/eosc-recommender-metrics/blob/master/docs/RSmetrics.png">
17-
<img src="https://github.com/nikosT/eosc-recommender-metrics/blob/master/docs/RSmetrics.png" width="70%"/>
22+
<a href="https://github.com/ARGOeu/eosc-recommender-metrics/blob/ec222c3090892f33056086b8d30c18f713da519d/website/docs/static/img/rsmetrics.png">
23+
<img src="website/docs/static/img/rsmetrics.png" width="70%"/>
1824
</a>
1925
</p>
2026

@@ -31,21 +37,21 @@ A framework for counting the recommender metrics
3137
5. Configure `./preprocessor_common.py`, `./preprocessor.py` and `./rsmetrics.py` by editting the `config.yaml` or providing another with `-c`.
3238
6. Run from terminal: `./preprocessor_common.py` in order to gather `users` and `resources` and store them in the `Datastore`:
3339
```bash
34-
./preprocessor_common.py # this will ingest users and resources [from scratch] by retrieving the data from 'cyfronet' provider (which is specified in the config file
35-
./preprocessor_common.py -p cyfronet # equivalent to first one
36-
./preprocessor_common.py -p cyfronet --use-cache # equivalent to first one but use the cache file to read resources instead of downloading them via the EOSC Marketplace
37-
./preprocessor_common.py -p athena # currently is not working since users collection only exist in 'cyfronet'
40+
./preprocessor_common.py # this will ingest users and resources [from scratch] by retrieving the data from 'marketplace_rs' provider (which is specified in the config file
41+
./preprocessor_common.py -p marketplace_rs # equivalent to first one
42+
./preprocessor_common.py -p marketplace_rs --use-cache # equivalent to first one but use the cache file to read resources instead of downloading them via the EOSC Marketplace
43+
./preprocessor_common.py -p athena # currently is not working since users collection only exist in 'marketplace_rs'
3844
```
3945
7. Run from terminal: `./preprocessor.py -p <provider>` in order to gather `user_actions` and `recommendations` from the particular provider and store them in the `Datastore`:
4046
```bash
41-
./preprocessor.py # this will ingest user_actions and recommendations [from scratch] by retrieving the data from 'cyfronet' provider (which is specified in the config file
42-
./preprocessor.py -p cyfronet # equivalent to first one
47+
./preprocessor.py # this will ingest user_actions and recommendations [from scratch] by retrieving the data from 'marketplace_rs' provider (which is specified in the config file
48+
./preprocessor.py -p marketplace_rs # equivalent to first one
4349
./preprocessor.py -p athena # same procedure as the first one but for 'athena' provider
4450
```
4551
9. Run from terminal: `./rsmetrics.py -p <provider>` in order to gather the respective data (`users`, `resources`, `user_actions` and `recommendations`), calculate `statistics` and `metrics` and store them in the `Datastore`, concerning that particular provider:
4652
```bash
47-
./rsmetrics.py # this will calculate and store statistics and metrics concerning data (users, resources, user_actions and recommendations) concerning the specified provider (which by default is 'cyfronet')
48-
./rsmetrics.py -p cyfronet # equivalent to first one
53+
./rsmetrics.py # this will calculate and store statistics and metrics concerning data (users, resources, user_actions and recommendations) concerning the specified provider (which by default is 'marketplace_rs')
54+
./rsmetrics.py -p marketplace_rs # equivalent to first one
4955
./rsmetrics.py -p athena # same procedure as the first one for 'athena' provider
5056
```
5157

@@ -92,16 +98,36 @@ optional arguments:
9298

9399
### Utilities
94100

95-
#### Get service catalog script (./get_service_catalog.py)
101+
#### Get item catalog script (./get_catalog.py)
102+
103+
This script contacts EOSC Marketplace remote service api and generates a csv with a list of all available items of a specific catalog (e.g. services, datasets, trainings, publications, data_sources, ), their name, id and url
96104

97-
This script contacts EOSC Marketplace catalog and generates a csv with a list of all available services, their name, id and url
98105

99106
To execute the script issue:
100107
```
101-
chmod u+x ./get_service_catalog.py
102-
./get_service_catalog.py
108+
chmod u+x ./get_catalog.py
109+
./get_catalog.py -u https://remote.example.foo -c service -b 100 -l 2000 -o `my-catalog.csv`
103110
```
104111

112+
Arguments:
113+
- `-u` or `-url`: the endpoint url of the marketplace search service
114+
- `-o` or `--output`: this is the output csv file (e.g. `./service_catalog.csv` or `./training_catalog.csv`) - optional
115+
- `-b` or `--batch`: because search service returns results with pagination this configures the batch for each retrieval (number of items per request) - optional
116+
- `-l` or `--limit`: (optional) the user can specify a limit of max items to be retrieves (this is handy for large catalogs if you want to receive a subset) - optional
117+
- `-c` or `--category`: the category of list of items you want to retrieve
118+
- `-d` or `--datastore`: mongodb destination database uri to store the results into (e.g. `mongodb://localhost:27017/rsmetrics`) - optional
119+
- `-p` or `--providers`: state in a comma-separated list wich providers (engines) handle the items of the specific category
120+
currently supported category types for marketplace:
121+
- `service`
122+
- `training`
123+
- `dataset` (this is for items of the `DATA` catalog)
124+
- `data_source` (this is for items of the `DATASOURCES` catalog)
125+
- `publication`
126+
- `guideline` (this is for items of the `INTEROPERABILITY GUIDELINES` catalog)
127+
- `software`
128+
- `bundle`
129+
- `other`
130+
105131
##### Serve Evaluation Reports as a Service
106132

107133
The `webservice` folder hosts a simple webservice implemented in Flask framework which can be used to host the report results.

config.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
# a list of:
33
# name/tag, type of database, hostname, port, database
44
providers:
5-
- name: cyfronet
5+
- name: marketplace_rs
66
db: "mongodb://localhost:27017/recommender_dev"
77
- name: athena
88
db: "mongodb://localhost:27017/athena_dev"
9+
- name: online_engine
10+
db: ""
911

1012
# The database where the Preprocessor's
1113
# and RSmetrics data are stored
@@ -15,10 +17,12 @@ service:
1517
# Use the EOSC-Marketplace webpage
1618
# to retrieve resources and associate the page_id and the service_id
1719
store: './page_map' # or null
18-
20+
service_list_url: 'https://localhost/replace/with/remote/example'
1921
# if true it keeps only published, otherwise all
2022
# this has an effect in exporting when from is set to 'source'
2123
# and also in metrics calculations where service is considered
2224
published: true
23-
24-
25+
category:
26+
athena: [service]
27+
marketplace_rs: [service]
28+
online_engine: [training, data_source]

docs/Preprocessor.png

-61.9 KB
Binary file not shown.

docs/Preprocessor.png.old

-54.3 KB
Binary file not shown.

docs/RSmetrics.png

-35.7 KB
Binary file not shown.

docs/RSmetrics.png.old

-34.3 KB
Binary file not shown.

docs/preprocessor-config.png

-153 KB
Binary file not shown.

0 commit comments

Comments
 (0)