Comments (5)
Hi
- You just need to pass your .code and .vocab files to
preprocess.py
using the fastbpe_vocab_path and fastbpe_code_path parameters. It will reload your BPE instead of computing a new one. - test.cpp_sa-java_sa.cpp_sa.pth contains the cpp functions for cpp-java translation and test.cpp_sa-java_sa.java_sa.pth contains the java functions.
- We used the BPE codes and vocab learned from the monolingual dataset (used for MLM) when computing the monolingual function dataset using the parameters I mentioned in 1.
from codegen.
Thanks @brozi for the reply.
Few more clarifications questions.
- In case we don't have unit tests, then in AE and BT training do we require to create 'train.cpp_sa-java_sa.java_sa.pth', val.cpp_sa-java_sa.java_sa.pth, and test.cpp_sa-java_sa.java_sa.pth files ? In case what will be the value of --bt_steps parameter ?
- If we have some parallel train set then just adding mt_steps will train the model on parallel train set ? Also what kind of loss function is used in mt_steps and bt_steps?
- What is use of line 539 in evaluator.py
from codegen.
Hi @dineshkh,
- You still need to keep the same bt_steps parameters no matter what your test/valid set is. If you don't have unit tests, you can set --eval_computation to false and your models will be evaluated with metrics such as BLEU, token accuracy, and perplexity. Our code would still look for parallel test/valid files to compute these metrics. You could either modify the code to not do any evaluation or add files with just one line with a simple example. Note: 'train.cpp_sa-java_sa.java_sa.pth' would be a train file with parallel cpp/java data and we don't use anything like that in TransCoder.
- Yes the simplest way to use a parallel train set is to add mt_steps to train to translate. Both mt and bt steps are training using the cross-entropy. The difference is that we generate the source sentence in back-translation (allowing to train with monolingual datasets) while mt_steps use the sentence from the dataset.
- It just limits the time spent evaluating MLM. It would probably be better to clean this up by making turning it into a parameter.
from codegen.
Thanks @brozi.
Can you please tell me how MT and BT steps are training using the cross-entropy loss ? Is it summing binary cross-entropy over all the tokens in the ground truth sequence? Any references or material you can point ?
from codegen.
@brozi thanks for your explanations, but to me it is not unclear how the parallel files like train.cpp_sa-java_sa.java_sa.pth are produced. the preprocessing pipeline seems to process each language independently. at which stage are they connected? tokenization, bpe, or binarization stage? do I need to put both languages in a single json, somehow? thanks
from codegen.
Related Issues (20)
- Are Decompilation Model Checkpoints available to share?
- Is there a method to directly evaluate my trasnlated code snippets?
- Possible overfitting with "TransCoder_model_1.pth" from Java -> Python
- missing file requirements-notorch.txt HOT 2
- Error : ModuleNotFoundError: No module named 'packaging' #793
- The lack of paralled dataset in Transcoder-IR
- Assertion `srcIndex < srcSelectDimSize` failed HOT 4
- Pretrain modell HOT 1
- Bug in epoch calculation
- Could you please build a website to support API to translate the program languages?
- Empty .sa.tok files after select_functions & request to release self_training dataset
- typo in readme: donwload HOT 2
- `fastBPE` fix path
- Lang embeddings loading
- Untokenized version of transcoder_test_set.zip
- [Question] How to write extract_function method?
- Training MLM with reload model as TransCoder_model_1 on csharp monolingual data generated from pre_processing
- [Question]retrained the original TransCoder model, translation was not good
- Parallel dataset generated by TransCoder-ST
- Go and Rust models HOT 2
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 codegen.