Giter Club home page Giter Club logo

neurocuts's Introduction

NeuroCuts

NeuroCuts is a deep RL algorithm for generating optimized packet classification trees. See the preprint for an overview.

Running NeuroCuts

You can train a NeuroCuts policy for the small acl5_1k rule set using the following command. This should converge to an memory access time of 9-10 within 50k timesteps:

python run_neurocuts.py --rules=acl5_1k --fast

To monitor training progress, open tensorboard --logdir=~/ray_results and navigate to the web UI. The important metrics to pay attention to are rules_remaining_min (this must reach zero before the policy starts generating "valid" trees), memory_access_valid_min (access time metric for valid trees), bytes_per_rule_valid_min (bytes per rule metric for valid trees), and vf_explained_var (explained variance of the value function, which approaches 1 as the policy converges):

stats

To kick off a full-scale training run, pass in a comma separated list of rule file names from the classbench directory and overrides for other hyperparameters. Example:

python run_neurocuts.py --rules=acl1_10k,fw1_10k,ipc1_10k \
    --partition-mode=efficuts \
    --dump-dir=/tmp/trees --num-workers=8 --gpu

Inspecting trees

You can visualize and check the state of generated trees by running inspect_tree.py <tree.pkl>. This requires that you specify the --dump-dir option when running NeuroCuts training.

Running baselines

You can run the HiCuts, HyperCuts, EffiCuts, and CutSplit baselines using run_baselines.py.

neurocuts's People

Contributors

ericl avatar ishizakiyu avatar xinjin avatar yitianz 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.