mirror of
https://github.com/deepseek-ai/DeepSeek-Coder.git
synced 2025-07-10 11:18:58 -04:00
support for rust
This commit is contained in:
parent
b7ba565956
commit
7240b22b56
156
Evaluation/HumanEval/data/humaneval-rust.jsonl
Normal file
156
Evaluation/HumanEval/data/humaneval-rust.jsonl
Normal file
File diff suppressed because one or more lines are too long
6
Evaluation/HumanEval/eval.sh
Normal file → Executable file
6
Evaluation/HumanEval/eval.sh
Normal file → Executable file
@ -1,4 +1,4 @@
|
||||
MODEL_NAME_OR_PATH="deepseek/deepseek-coder-1b"
|
||||
MODEL_NAME_OR_PATH="/scratch/shared_dir/xinyu/deepseek-1.3b"
|
||||
DATASET_ROOT="data/"
|
||||
LANGUAGE="python"
|
||||
CUDA_VISIBLE_DEVICES=1,2,3 python -m accelerate.commands.launch --config_file test_config.yaml eval_pal.py --logdir ${MODEL_NAME_OR_PATH} --language ${LANGUAGE} --dataroot ${DATASET_ROOT}
|
||||
LANGUAGE="rust"
|
||||
CUDA_VISIBLE_DEVICES=1,2,3 python -m accelerate.commands.launch --config_file test_config.yaml eval_pal.py --logdir ${MODEL_NAME_OR_PATH} --language ${LANGUAGE} --dataroot ${DATASET_ROOT}
|
||||
|
@ -167,9 +167,9 @@ def process_humaneval_test(sample, problems, example_test=False, is_mbpp=False,
|
||||
else:
|
||||
test_string = test_setup + "\n" + prompt + code + "\n" + test
|
||||
elif language == "rust":
|
||||
main = "\nfn main(){ \n } \n"
|
||||
declaration = problems[task_id]["declaration"]
|
||||
test_string = main + declaration + prompt + code + test
|
||||
# main = "\nfn main(){ \n } \n"
|
||||
# declaration = problems[task_id]["declaration"]
|
||||
test_string = code + test
|
||||
elif language == "php":
|
||||
if code[:5] != "<?php":
|
||||
code = "<?php\n" + code
|
||||
|
8
Evaluation/HumanEval/human_eval/rust/Cargo.toml
Normal file
8
Evaluation/HumanEval/human_eval/rust/Cargo.toml
Normal file
@ -0,0 +1,8 @@
|
||||
[package]
|
||||
name = "rust"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
7
Evaluation/HumanEval/human_eval/rust/src/lib.rs
Normal file
7
Evaluation/HumanEval/human_eval/rust/src/lib.rs
Normal file
@ -0,0 +1,7 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn it_works() {
|
||||
assert_eq!(2 + 2, 4);
|
||||
}
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user