Comments (5)
Hi Avra,
Thank you for your interest in this work! Sorry again for the delayed response.
Yes, in order to use code2vec for python, you will have to train the model on a python dataset.
Have you seen this section in the README? https://github.com/tech-srl/code2vec#extending-to-other-languages
Uri
from code2seq.
@urialon. astminer team helped me producing training, testing and validation python.c2v
data. So, how we should proceed next please to train code2vec model? Then once we train the model, can we feed the same data to produce embeddings as we have 20k python files that we split into train, test and validate before feeding them to astminer tool. Once we train code2vec, we would like to feed the same python code to produce embeddings, so what do you think please?
from code2seq.
I am not sure how your python.c2v
look like, but try to continue running the preprocess.sh
script starting from this line: https://github.com/tech-srl/code2seq/blob/master/preprocess.sh#L54 (and adapt all paths according to your files).
from code2seq.
Thank you. So I will train your model on 150k python dataset. How to please save the model to use it later on another python dataset to generate embeddings? Does the preprocessor.sh
does it automatically and save the model please?
We would like too once we train the model on 150k python dataset you specified to use to generate later on one embedding vector for each python file we have in our own dataset, can we do that please? We don't want to generate method name but one embedding that is representative of a file. We would like to do the same for our 20k python files.
from code2seq.
Hi @Avra2 ,
preprocess.sh
just preprocesses the data, it does not even train the model.
However, train.sh
trains and saves the checkpoints. See:
https://github.com/tech-srl/code2vec#training-a-model-from-scratch
from code2seq.
Related Issues (20)
- Help with implementing local service with JavaExtractor HOT 10
- I can not preprocess Python dataset
- Error running prediction on Code2seq released model
- I got Out of Memory Error during Training
- Unable to get embeddings from the trained model for Java
- Extract Path Contexts Only HOT 5
- InvalidArgumentError in sess.run() HOT 3
- Visualize Python AST HOT 2
- Extract java files HOT 2
- Getting "was not completed in time" error when preprocessing dataset HOT 11
- code2seq for Python HOT 3
- Error processing property '_dropout_mask_cache' of <ContextValueCache> HOT 6
- Sampling k paths from AST tree HOT 11
- I am getting TimeError while using code2seq to predict long method HOT 2
- Generating code documentation with code2seq HOT 8
- Tensorflow out-of-bound error while trying to train the Code2Seq model on our own python dataset HOT 6
- Model is predicting empty string for custom python dataset HOT 8
- Exporting code vectors HOT 6
- Encountered error of preprocess data HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from code2seq.