Skip to content

sonata-nfv/tng-vnv-dsm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Join the chat at https://gitter.im/sonata-nfv/Lobby Build Status

tng-vnv-dsm

Decision Support Mechanism/SVD-based Recommender System

This repository includes the tng-vnv-dsm component, which incorporates the Decision Support Mechanism of the 5GTANGO Catalogues, both of which are part of the European H2020 project 5GTANGO. The component is responsible for delivering test recommendations to the end-users of the 5GTANGO ecosystem, through the deployment of matrix-factorization techniques.

Main Cababilities
  • Retrieve a user's test recommendations
  • Retrieve component's health
  • Retrieve the tests tags the systems is trained for
  • Retrieve the users the systems is trained for
  • Add user-item pairs from a .tgo package
Example of a user's recommendations
{
  "user": "user2",
  "rec_tests": [
    "tag9",
    "tag7"
  ]
}

Documentation

Besides this README file, more documentation is available in the wiki belonging to this repository.

Installation and Dependencies

This component is implemented in Python3. Its requirements are specified in the requirements.txt in the root folder as follows here. In general, a new virtual environment would be beneficial in the installation.

Frameworks

  • Flask - Python Microframework

Libraries

  • pandas : v0.23.4
  • Werkzeug==0.14.1
  • numpy
  • cython
  • flask
  • json-logging
  • requests
  • surprise

Automated installation:

The automated installation requires pip (more specifically pip3).

$ pip install git+https://github.com/sonata-nfv/tng-vnv-dsm

Manual installation:

$ git clone git@github.com:sonata-nfv/tng-vnv.dsm.git
$ cd tng-vnv-dsm
$ python setup.py install

API References

We have specified this micro-service's API in a swagger-formated file. Please check it [here] (not implemented yet)

Logging

tng-vnv-dsm uses the json-logging logging services, to produce logs in the 5GTANGO JSON format as described here (authentication needed).

{
  "asctime": "2018-02-16T09:51:31Z",
  "name": "test", "processName": "MainProcess",
  "filename": "write_in_console.py",
  "funcName": "<module>",
  "levelname": "INFO",
  "lineno": 20,
  "module": "write_in_console",
  "threadName": "MainThread",
  "message": "classic message",
  "special": "value",
  "run": 12,
  "timestamp": "2016-02-16T09:51:31Z",
  "hostname": "<your_hostname>"
}

Usage

The Decision Support mechanism is delivered to be deployed as a micro service, offering a REST API to provide recommendations on top of the 5GTANGO Catalogues. However, it can be utilized as a standalone service to provide recommendations based on SVD matrix factorization technique.

Run tng-vnv-dsm as a service:

Docker-based

In this option, a functional mongoDB is essential for the core functionality of the service.

# build Docker container
sudo docker build .

# run Docker container
docker run --rm -d -p 4010:4010 --name tng-vnv-dsm registry.sonata-nfv.eu:5000/tng-vnv-dsm

Development

To contribute to the development of this 5GTANGO component, you may use the very same development workflow as for any other 5GTANGO Github project. That is, you have to fork the repository and create pull requests.

Setup development environment

$ python setup.py develop

Contributing

You may contribute to the tng-vnv-dsm tool you should:

  1. Fork this repository;
  2. Work on your proposed changes, preferably through submiting issues;
  3. Push changes on your fork;
  4. Submit a Pull Request;
  5. Follow/answer related issues (see Feedback-Chanel, below).

CI Integration

All pull requests are automatically tested by Jenkins and will only be accepted if no test is broken.

License

This 5GTANGO component is published under Apache 2.0 license. Please see the LICENSE file for more details.


Lead Developers

The following lead developers are responsible for this repository and have admin rights. They can, for example, merge pull requests.

Feedback-Chanel

  • Please use the GitHub issues to report bugs.