Coder Social home page Coder Social logo

salento's Introduction

Salento

Salento is a statistical bug-detection framework based on the machine learning model used by Bayou. For technical details about Salento refer to the paper Bayesian Specification Learning for Finding API Usage Errors, FSE'17 (link)

Requirements

  • Python3 (Tested with 3.5.1)
  • Tensorflow (Tested with 1.4)

Training

To train a Salento model on a data file, say DATA.json:

  1. Setup environment:
export PYTHONPATH=$PYTHONPATH:/path/to/salento/src/main/python
  1. Ensure that the data is in the right JSON format using the schema file doc/json_schemas/salento_input_schema.json.

  2. (Optional.) Extract evidences from the data:

python3 src/main/python/scripts/evidence_extractor.py DATA.json DATA-training.json

This will create a DATA-training.json after extracting evidences from each package in DATA.json. Run with --help for more options that you can use to filter the sequences selected for training.

  1. Go to the model folder and start training with a model configuration:
cd src/main/python/salento/models/low_level_evidences
python3 train.py /path/to/DATA-training.json --config config.json

Run with --help to see a description of the model configuration options. Edit config.json as needed.

Inference

To test a trained model on some test data:

1-3. Follow steps 1-3 above to produce a file DATA-testing.json with evidences.

  1. Go to the aggregators folder and run one of the aggregators on the test data:
cd src/main/python/salento/aggregators
python3 sequence_aggregator.py --data_file /path/to/DATA-testing.json --model_dir /path/to/model/directory

The model directory should contain the trained model's files, such as checkpoint, config.json, etc.

salento's People

Contributors

asingh-gt avatar cogumbreiro avatar vineethk avatar vm4422 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.