All Projects → JetBrains-Research → embeddings-for-trees

JetBrains-Research / embeddings-for-trees

Licence: MIT license
Set of PyTorch modules for developing and evaluating different algorithms for embedding trees.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to embeddings-for-trees

adversarial-code-generation
Source code for the ICLR 2021 work "Generating Adversarial Computer Programs using Optimized Obfuscations"
Stars: ✭ 16 (-15.79%)
Mutual labels:  ml4code, ml4se
quickvision
An Easy To Use PyTorch Computer Vision Library
Stars: ✭ 49 (+157.89%)
Mutual labels:  pytorch-lightning
Transformer-QG-on-SQuAD
Implement Question Generator with SOTA pre-trained Language Models (RoBERTa, BERT, GPT, BART, T5, etc.)
Stars: ✭ 28 (+47.37%)
Mutual labels:  pytorch-lightning
AutoTabular
Automatic machine learning for tabular data. ⚡🔥⚡
Stars: ✭ 51 (+168.42%)
Mutual labels:  pytorch-lightning
code-transformer
Implementation of the paper "Language-agnostic representation learning of source code from structure and context".
Stars: ✭ 130 (+584.21%)
Mutual labels:  ml4code
labml
🔎 Monitor deep learning model training and hardware usage from your mobile phone 📱
Stars: ✭ 1,213 (+6284.21%)
Mutual labels:  pytorch-lightning
treenet
Recursive Neural Networks for PyTorch
Stars: ✭ 29 (+52.63%)
Mutual labels:  tree-lstm
type4py
Type4Py: Deep Similarity Learning-Based Type Inference for Python
Stars: ✭ 41 (+115.79%)
Mutual labels:  ml4se
bert-squeeze
🛠️ Tools for Transformers compression using PyTorch Lightning ⚡
Stars: ✭ 56 (+194.74%)
Mutual labels:  pytorch-lightning
uvadlc notebooks
Repository of Jupyter notebook tutorials for teaching the Deep Learning Course at the University of Amsterdam (MSc AI), Fall 2022/Spring 2022
Stars: ✭ 901 (+4642.11%)
Mutual labels:  pytorch-lightning
pytorch-lightning-template
An easy/swift-to-adapt PyTorch-Lighting template. 套壳模板,简单易用,稍改原来Pytorch代码,即可适配Lightning。You can translate your previous Pytorch code much easier using this template, and keep your freedom to edit all the functions as well. Big-project-friendly as well.
Stars: ✭ 555 (+2821.05%)
Mutual labels:  pytorch-lightning
BrainMaGe
Brain extraction in presence of abnormalities, using single and multiple MRI modalities
Stars: ✭ 23 (+21.05%)
Mutual labels:  pytorch-lightning
weasel
Weakly Supervised End-to-End Learning (NeurIPS 2021)
Stars: ✭ 117 (+515.79%)
Mutual labels:  pytorch-lightning
skillful nowcasting
Implementation of DeepMind's Deep Generative Model of Radar (DGMR) https://arxiv.org/abs/2104.00954
Stars: ✭ 117 (+515.79%)
Mutual labels:  pytorch-lightning
pytorch multi input example
Multi-Input Deep Neural Networks with PyTorch-Lightning - Combine Image and Tabular Data
Stars: ✭ 40 (+110.53%)
Mutual labels:  pytorch-lightning
deepaudio-speaker
neural network based speaker embedder
Stars: ✭ 19 (+0%)
Mutual labels:  pytorch-lightning
lightning-hydra-template
PyTorch Lightning + Hydra. A very user-friendly template for rapid and reproducible ML experimentation with best practices. ⚡🔥⚡
Stars: ✭ 1,905 (+9926.32%)
Mutual labels:  pytorch-lightning
map-floodwater-satellite-imagery
This repository focuses on training semantic segmentation models to predict the presence of floodwater for disaster prevention. Models were trained using SageMaker and Colab.
Stars: ✭ 21 (+10.53%)
Mutual labels:  pytorch-lightning
DGL Chinese Manual
This is the Chinese manual of the graph neural network library DGL, currently contains the User Guide.
Stars: ✭ 61 (+221.05%)
Mutual labels:  dgl
MVSNet pl
MVSNet: Depth Inference for Unstructured Multi-view Stereo using pytorch-lightning
Stars: ✭ 49 (+157.89%)
Mutual labels:  pytorch-lightning

JetBrains Research Github action: build Code style: black Checked with mypy

Embeddings for trees

Set of PyTorch modules for developing and evaluating different algorithms for embedding trees.

Requirements

You can install the dependencies by using the requirement list

pip install -r requirements.txt

Although it's better to install PyTorch and DGL manually for correct CUDA support.

Data preprocessing

List of some useful tools for preprocessing source code into a dataset with ASTs:

  • ASTMiner - tool for mining raw ASTs and path-based representation of code using ANTLR, GumTree and other grammars.
  • PSIMiner - tool for processing PSI trees from IntelliJ IDEA and creating labeled dataset from them.

Model zoo

This section contains information about implemented models.

TreeLSTM

PyTorch reimplementation of ChildSum version of TreeLSTM presented by Tai et al. in "Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks".

There are 3 different variantions of these model:

  1. Classic — ChildSum TreeLSTM model for code AST with LSTM+attention decoder that was wisely used in other works To train or test model use:
python -m embeddings_for_trees.treelstm train/test -c $CONFIG_PATH
  1. Typed TreeLSTM — the same classic model, but works with typed AST that were introduced in PSIMiner To train or test model use:
python -m embeddings_for_trees.typed_treelstm train/test -c $CONFIG_PATH
  1. TreeLSTM with pointers — ChildSum TreeLSTM model with pointer network to AST leaves for decoding To train or test model use:
python -m embeddings_for_trees.treelstm_ptr train/test -c $CONFIG_PATH

For config examples see config directory. Classic model and model with pointer network share configurations, while typed model requires specification for token types vocabulary.

Contribution

Supporting different algorithms of encoding and decoding trees is the key area of improvement for this framework. If you have any suggestions or questions, feel free to open issues and create pull requests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].