GithubHelp home page GithubHelp logo

dire's People

Contributors

huzecong avatar jlacomis avatar sei-eschwartz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dire's Issues

Function Name Prediction

Hi, I'm reading the source code and struggeling to see if I can use DIRE to predict the names of functions.

Is this possible and what would be the best way to achieve this?

Thanks.

Pretrained models don't contain vocab files

(venv) ed@ed-Precision-7540:~/Documents/DIRE/neural-model$ python exp.py test --cuda --extra-config='{"decoder": {"remove_duplicates_in_prediction": true} }' '/media/ed/Dell Portable Hard Drive/dire-data/pretrained_models/data/saved_models/model.hybrid.bin' '/media/ed/Dell Portable Hard Drive/dire-data/preprocessed_splits/test.tar'
Main process id 9942
use random seed 0
loading model from [/media/ed/Dell Portable Hard Drive/dire-data/pretrained_models/data/saved_models/model.hybrid.bin]
{'gnn': {'hidden_size': 128, 'layer_timesteps': [8], 'residual_connections': {'0': [0]}}, 'connections': ['top_down', 'bottom_up', 'terminals', 'variable_master_nodes', 'func_root_to_arg'], 'vocab_file': 'data/all_trees_tokenized_0410/vocab.bpe10000.old_gnn/vocab', 'bpe_model_path': None, 'node_syntax_type_embedding_size': 64, 'node_type_embedding_size': 64, 'node_content_embedding_size': 128, 'init_with_seq_encoding': False, 'decoder_hidden_size': 256, 'dropout': 0.2}
Traceback (most recent call last):
  File "exp.py", line 217, in <module>
    test(cmd_args)
  File "exp.py", line 186, in test
    model = model_cls.load(model_path, use_cuda=args['--cuda'], new_config=extra_config)
  File "/home/ed/Documents/DIRE/neural-model/model/model.py", line 149, in load
    model = cls.build(config, **kwargs)
  File "/home/ed/Documents/DIRE/neural-model/model/model.py", line 64, in build
    encoder = globals()[config['encoder']['type']].build(config['encoder'])
  File "/home/ed/Documents/DIRE/neural-model/model/hybrid_encoder.py", line 51, in build
    return cls(params)
  File "/home/ed/Documents/DIRE/neural-model/model/hybrid_encoder.py", line 23, in __init__
    self.graph_encoder = GraphASTEncoder.build(config['graph_encoder'])
  File "/home/ed/Documents/DIRE/neural-model/model/graph_encoder.py", line 107, in build
    vocab = Vocab.load(params['vocab_file'])
  File "/home/ed/Documents/DIRE/neural-model/utils/vocab.py", line 170, in load
    params = json.load(open(path, 'r'))
FileNotFoundError: [Errno 2] No such file or directory: 'data/all_trees_tokenized_0410/vocab.bpe10000.old_gnn/vocab'

This is using the model from http://www.cs.cmu.edu/~pengchey/dire_models.zip

Training command line does not include dev set

Training command line does not include dev set:

python exp.py \
    train \
    --cuda \
    --work-dir=exp_runs/dire.hybrid \
    --extra-config='{ "data": {"train_file": "data/preprocessed_data/train-shard-*.tar" }, "decoder": { "input_feed": false, "tie_embedding": true }, "train": { "evaluate_every_nepoch": 5, "max_epoch": 60 } }' \
    data/config/model.hybrid.jsonnet

Fixed in ed-wip branch, close when merged.

Overuse of DWARF information

DWARF is currently used for more than variable naming during dataset generation. We may be able to improve alignment if we can disable DWARF use for calling conventions. The IDA GUI prompts for some of these, but I don't see a way to control this in batch mode.

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.