Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Is there a method to directly evaluate my trasnlated code snippets?

オープン
#102 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
bash, python

調査の方向性

codegen_sources/model/train.py から始め、codegen_sources/model/src/data/loader.py の check_data_params を調べてから、17 行目付近の eval.sh を確認します。ダウンロードしたテストセットに対して文書化されたコマンドを再実行し、欠落している .pth ファイルとシェルエラーを区別します。評価コマンドが初期データチェックを、報告された 2 つの失敗のいずれも発生させずに完了すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

When I run the evaluation script you listed in readme:

MODEL=""
python codegen_sources/model/train.py \
--exp_name transcoder_eval \
--dump_path '<DUMP_PATH>' \
--data_path './data/test_dataset' \ #here I the validation set you provided in https://dl.fbaipublicfiles.com/transcoder/test_set/transcoder_test_set.zip
--bt_steps 'python_sa-java_sa-python_sa,java_sa-python_sa-java_sa,python_sa-cpp_sa-python_sa,java_sa-cpp_sa-java_sa,cpp_sa-python_sa-cpp_sa,cpp_sa-java_sa-cpp_sa'    \
--encoder_only False \
--n_layers 0  \
--n_layers_encoder 6  \
--n_layers_decoder 6 \
--emb_dim 1024  \
--n_heads 8  \
--lgs 'cpp_sa-java_sa-python_sa'  \
--max_vocab 64000 \
--gelu_activation false \
#--roberta_mode false  \
--amp 2  \
--fp16 true  \
--tokens_per_batch 3000  \
--max_batch_size 128 \
--eval_bleu true \
--eval_computation true \
--has_sentence_ids "valid|para,test|para" \
--generate_hypothesis true \
--save_periodic 1 \
--reload_model "$MODEL,$MODEL" \
--reload_encoder_for_decoder false \
--eval_only true \
--n_sentences_eval 1500

ERROR BELOW:
adding to path /home/yz/CodeGen 2023-05-26 03:01:30.703702: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F AVX512_VNNI FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-05-26 03:01:30.836176: I tensorflow/core/util/port.cc:104] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0. 2023-05-26 03:01:31.312719: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory 2023-05-26 03:01:31.312770: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory 2023-05-26 03:01:31.312777: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly. adding to path /home/yz/CodeGen Using /home/yz/data/CodeGen/code_evaluation/tmp_tests_folder for temporary files. adding to path /home/yz/CodeGen No efficient attention. adding to path /home/yz/CodeGen adding to path /home/yz/CodeGen ERROR - 05/26/23 03:01:32 - 0:00:00 - ./data/test_dataset/train.cpp_sa.pth not found ERROR - 05/26/23 03:01:32 - 0:00:00 - ./data/test_dataset/valid.cpp_sa.pth not found ERROR - 05/26/23 03:01:32 - 0:00:00 - ./data/test_dataset/test.cpp_sa.pth not found ERROR - 05/26/23 03:01:32 - 0:00:00 - ./data/test_dataset/train.java_sa.pth not found ERROR - 05/26/23 03:01:32 - 0:00:00 - ./data/test_dataset/valid.java_sa.pth not found ERROR - 05/26/23 03:01:32 - 0:00:00 - ./data/test_dataset/test.java_sa.pth not found ERROR - 05/26/23 03:01:32 - 0:00:00 - ./data/test_dataset/train.python_sa.pth not found ERROR - 05/26/23 03:01:32 - 0:00:00 - ./data/test_dataset/valid.python_sa.pth not found ERROR - 05/26/23 03:01:32 - 0:00:00 - ./data/test_dataset/test.python_sa.pth not found Traceback (most recent call last): File "/home/yz/CodeGen/codegen_sources/model/train.py", line 1016, in check_data_params(params) File "/home/yz/CodeGen/codegen_sources/model/src/data/loader.py", line 582, in check_data_params assert all( AssertionError: [['./data/test_dataset/train.cpp_sa.pth', './data/test_dataset/valid.cpp_sa.pth', './data/test_dataset/test.cpp_sa.pth'], ['./data/test_dataset/train.java_sa.pth', './data/test_dataset/valid.java_sa.pth', './data/test_dataset/test.java_sa.pth'], ['./data/test_dataset/train.python_sa.pth', './data/test_dataset/valid.python_sa.pth', './data/test_dataset/test.python_sa.pth']] eval.sh: line 17: --amp: command not found

How to solve this problem?
Thanks!

主要言語
Python
スター
777
フォーク
144
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

facebookresearch/CodeGen のほかの issue

facebookresearch/CodeGen の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。