Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/deepseek-ai/DeepSeek-Coder
/ functions
Functions
149 in github.com/deepseek-ai/DeepSeek-Coder
⨍
Functions
149
◇
Types & classes
23
↓ 9 callers
Function
time_limit
(seconds: float)
Evaluation/MBPP/human_eval/execution.py:591
↓ 9 callers
Function
time_limit
(seconds: float)
Evaluation/LeetCode/human_eval/execution.py:591
↓ 9 callers
Function
time_limit
(seconds: float)
Evaluation/HumanEval/human_eval/execution.py:591
↓ 5 callers
Function
strip_string
(string)
Evaluation/PAL-Math/utils/parser.py:62
↓ 4 callers
Function
evaluate_functional_correctness
Evaluates the functional correctness of a model.
Evaluation/HumanEval/human_eval/evaluation.py:197
↓ 4 callers
Function
math_equal
Exact match of math if and only if: 1. numerical equal: both can convert to float and are equal 2. symbolic equal: both can convert to sy
Evaluation/PAL-Math/utils/grader.py:22
↓ 3 callers
Function
_truncate_code_at_stopwords
(code, stop_words)
Evaluation/MBPP/utils/utils.py:34
↓ 3 callers
Function
_truncate_code_at_stopwords
(code, stop_words)
Evaluation/HumanEval/utils/utils.py:140
↓ 3 callers
Function
evaluate_functional_correctness
Evaluates the functional correctness of a model.
Evaluation/MBPP/human_eval/evaluation.py:196
↓ 3 callers
Function
extract_program_output
extract output between the last ```output\n...\n```
Evaluation/PAL-Math/utils/parser.py:227
↓ 3 callers
Method
read
(self, *args, **kwargs)
Evaluation/MBPP/human_eval/execution.py:626
↓ 2 callers
Function
_parse
(s)
Evaluation/PAL-Math/utils/grader.py:101
↓ 2 callers
Method
apply
(self, code)
Evaluation/PAL-Math/utils/python_executor.py:117
↓ 2 callers
Method
batch_apply
(self, batch_code)
Evaluation/PAL-Math/utils/python_executor.py:120
↓ 2 callers
Function
eval
Evaluate the results. :param args: Arguments. :return: None
Evaluation/PAL-Math/run.py:156
↓ 2 callers
Function
extract_answer
(pred_str)
Evaluation/PAL-Math/utils/parser.py:162
↓ 2 callers
Function
extract_generation_code
(example: str, lang_code: str, verbose: bool=False)
Evaluation/HumanEval/utils/utils.py:54
↓ 2 callers
Function
extract_python_code
(generation: str)
Evaluation/LeetCode/evaluate_leetcode.py:11
↓ 2 callers
Function
format_test_example
(q, tests, code: str=None)
Evaluation/MBPP/eval_instruct.py:15
↓ 2 callers
Function
is_digit
(s)
Evaluation/PAL-Math/utils/grader.py:15
↓ 2 callers
Function
process_humaneval_test
Processes a sample for evaluation.
Evaluation/MBPP/human_eval/evaluation.py:113
↓ 2 callers
Function
process_humaneval_test
(sample, problems, example_test=False, is_mbpp=False, language="python")
Evaluation/LeetCode/human_eval/evaluation.py:110
↓ 2 callers
Function
process_humaneval_test
Processes a sample for evaluation.
Evaluation/HumanEval/human_eval/evaluation.py:116
↓ 2 callers
Method
readlines
(self, *args, **kwargs)
Evaluation/MBPP/human_eval/execution.py:632
↓ 2 callers
Function
stream_jsonl
Parses each jsonl line and yields it as a dictionary
Evaluation/MBPP/human_eval/data.py:15
↓ 2 callers
Function
stream_jsonl
Parses each jsonl line and yields it as a dictionary
Evaluation/LeetCode/human_eval/data.py:15
↓ 2 callers
Function
stream_jsonl
Parses each jsonl line and yields it as a dictionary
Evaluation/HumanEval/human_eval/data.py:15
↓ 2 callers
Function
symbolic_equal
(a, b)
Evaluation/PAL-Math/utils/grader.py:100
↓ 1 callers
Method
__init__
(self, data_root, max_seq_len=2048, language="python", max_gen_len=200, batch_size=512,
Evaluation/MBPP/mbpp.py:38
↓ 1 callers
Method
_calculate_final_score
Calculate the final score.
Evaluation/MBPP/mbpp.py:186
↓ 1 callers
Method
_calculate_final_score
Calculate the final score.
Evaluation/HumanEval/humaneval.py:145
↓ 1 callers
Function
_clean_python_code_for_sft
(code)
Evaluation/MBPP/utils/utils.py:24
↓ 1 callers
Function
_clean_python_code_for_sft
(code)
Evaluation/HumanEval/utils/utils.py:130
↓ 1 callers
Function
_convert_for_sft
(ex)
Evaluation/LeetCode/vllm_inference.py:35
↓ 1 callers
Function
_fix_a_slash_b
(string)
Evaluation/PAL-Math/utils/parser.py:40
↓ 1 callers
Function
_fix_fracs
(string)
Evaluation/PAL-Math/utils/parser.py:8
↓ 1 callers
Function
_fix_sqrt
(string)
Evaluation/PAL-Math/utils/parser.py:57
↓ 1 callers
Function
_test
()
Evaluation/PAL-Math/utils/python_executor.py:167
↓ 1 callers
Function
_test_math_equal
()
Evaluation/PAL-Math/utils/grader.py:145
↓ 1 callers
Function
_tokenize_fn
Tokenize a list of strings.
finetune/finetune_deepseekcoder.py:51
↓ 1 callers
Function
build_deepseekcoder_instruction
(languge: str, question: str)
Evaluation/HumanEval/eval_instruct.py:14
↓ 1 callers
Function
build_instruction_prompt
(instruction: str)
finetune/finetune_deepseekcoder.py:16
↓ 1 callers
Function
call_with_timeout
(func, *args, timeout=1, **kwargs)
Evaluation/PAL-Math/utils/grader.py:130
↓ 1 callers
Function
chdir
(root)
Evaluation/MBPP/human_eval/execution.py:645
↓ 1 callers
Function
chdir
(root)
Evaluation/LeetCode/human_eval/execution.py:645
↓ 1 callers
Function
chdir
(root)
Evaluation/HumanEval/human_eval/execution.py:645
↓ 1 callers
Function
cleanup_code
Cleans up the generated code.
Evaluation/HumanEval/utils/utils.py:107
↓ 1 callers
Function
convert_for_evaluation
(example)
Evaluation/MBPP/eval_instruct.py:53
↓ 1 callers
Function
create_tempdir
()
Evaluation/MBPP/human_eval/execution.py:613
↓ 1 callers
Function
create_tempdir
()
Evaluation/LeetCode/human_eval/execution.py:613
↓ 1 callers
Function
create_tempdir
()
Evaluation/HumanEval/human_eval/execution.py:613
↓ 1 callers
Function
estimate_pass_at_k
Estimates pass@k of each problem and returns them in an array.
Evaluation/MBPP/human_eval/evaluation.py:88
↓ 1 callers
Function
estimate_pass_at_k
Estimates pass@k of each problem and returns them in an array.
Evaluation/LeetCode/human_eval/evaluation.py:85
↓ 1 callers
Function
estimate_pass_at_k
Estimates pass@k of each problem and returns them in an array.
Evaluation/HumanEval/human_eval/evaluation.py:91
↓ 1 callers
Function
estimator
Calculates 1 - comb(n - c, k) / comb(n, k).
Evaluation/MBPP/human_eval/evaluation.py:97
↓ 1 callers
Function
estimator
Calculates 1 - comb(n - c, k) / comb(n, k).
Evaluation/LeetCode/human_eval/evaluation.py:94
↓ 1 callers
Function
estimator
Calculates 1 - comb(n - c, k) / comb(n, k).
Evaluation/HumanEval/human_eval/evaluation.py:100
↓ 1 callers
Method
eval_model
Evaluate the model.
Evaluation/MBPP/mbpp.py:65
↓ 1 callers
Method
eval_model
Evaluate the model on HumanEval.
Evaluation/HumanEval/humaneval.py:49
↓ 1 callers
Function
evaluate_functional_correctness
( input_file: str = None, tmp_dir: str = "./", n_workers: int = 32, timeout: float = 10.0,
Evaluation/LeetCode/human_eval/evaluation.py:186
↓ 1 callers
Function
evaluate_main
(generation_path: str, result_path: str, temp_dir: str)
Evaluation/LeetCode/evaluate_leetcode.py:21
↓ 1 callers
Method
exec_code
(self, code_piece: str)
Evaluation/PAL-Math/utils/python_executor.py:34
↓ 1 callers
Function
extract_program
extract the program after "```python", and before "```"
Evaluation/PAL-Math/utils/parser.py:207
↓ 1 callers
Function
extract_python_block_with_solution
Extract the code block from the text that contains the solution function. :param text: The text to search for the code block. :return: Th
Evaluation/PAL-Math/run.py:13
↓ 1 callers
Function
generate_batch
(examples, tokenizer, llm, model: str)
Evaluation/LeetCode/vllm_inference.py:8
↓ 1 callers
Function
generate_main
(args)
Evaluation/MBPP/eval_instruct.py:89
↓ 1 callers
Function
generate_main
(data_path: str, model_name_or_path: str, saved_path: str, model_type: str='deepseekcoder-instruct', cot: bool
Evaluation/LeetCode/vllm_inference.py:33
↓ 1 callers
Function
generate_main
(args)
Evaluation/HumanEval/eval_instruct.py:48
↓ 1 callers
Function
generate_one
(example, tokenizer, model)
Evaluation/MBPP/eval_instruct.py:65
↓ 1 callers
Function
generate_one
(example, lang, tokenizer, model)
Evaluation/HumanEval/eval_instruct.py:22
↓ 1 callers
Function
get_function_name
(question: str, lang: str)
Evaluation/HumanEval/utils/utils.py:41
↓ 1 callers
Method
get_qa_only_data
(self, data_json)
Evaluation/MBPP/utils/dataset.py:32
↓ 1 callers
Method
get_qa_only_data
data_json: the jsonl file of HumanEval sft: whether to use the SFT setting return: a list of dict, each dict contains the pro
Evaluation/HumanEval/utils/dataset.py:26
↓ 1 callers
Function
inference
Inference on the dataset. :param args: Arguments. :return: None
Evaluation/PAL-Math/run.py:55
↓ 1 callers
Function
load_data
Load data from file. :param args: Arguments. :return: A list of examples.
Evaluation/PAL-Math/run.py:26
↓ 1 callers
Method
log_score
Log the score.
Evaluation/MBPP/mbpp.py:170
↓ 1 callers
Method
log_score
Log the score.
Evaluation/HumanEval/humaneval.py:129
↓ 1 callers
Function
main
()
Evaluation/MBPP/human_eval/evaluate_functional_correctness.py:25
↓ 1 callers
Function
main
()
Evaluation/HumanEval/human_eval/evaluate_functional_correctness.py:25
↓ 1 callers
Function
parse_ground_truth
(example: Dict[str, Any], data_name)
Evaluation/PAL-Math/utils/parser.py:241
↓ 1 callers
Function
parse_question
(example, data_name)
Evaluation/PAL-Math/utils/parser.py:282
↓ 1 callers
Function
preprocess
Preprocess the data by tokenizing.
finetune/finetune_deepseekcoder.py:77
↓ 1 callers
Method
process_generation_to_code
(self, gens: str)
Evaluation/PAL-Math/utils/python_executor.py:81
↓ 1 callers
Method
read
(self, *args, **kwargs)
Evaluation/HumanEval/human_eval/execution.py:626
↓ 1 callers
Function
read_dataset
Reads a dataset and returns a dictionary of tasks.
Evaluation/MBPP/human_eval/evaluation.py:68
↓ 1 callers
Function
read_dataset
( data_file: str = None, dataset_type: str = "humaneval", num_shot=None, )
Evaluation/LeetCode/human_eval/evaluation.py:68
↓ 1 callers
Function
read_dataset
Reads a dataset and returns a dictionary of tasks.
Evaluation/HumanEval/human_eval/evaluation.py:71
↓ 1 callers
Function
read_test_examples
(data_path: str)
Evaluation/MBPP/eval_instruct.py:14
↓ 1 callers
Method
readlines
(self, *args, **kwargs)
Evaluation/LeetCode/human_eval/execution.py:632
↓ 1 callers
Method
readlines
(self, *args, **kwargs)
Evaluation/HumanEval/human_eval/execution.py:632
↓ 1 callers
Function
reliability_guard
This disables various destructive functions and prevents the generated code from interfering with the test (e.g. fork bomb, killing other pro
Evaluation/MBPP/human_eval/execution.py:659
↓ 1 callers
Function
reliability_guard
This disables various destructive functions and prevents the generated code from interfering with the test (e.g. fork bomb, killing other pro
Evaluation/LeetCode/human_eval/execution.py:659
↓ 1 callers
Function
reliability_guard
This disables various destructive functions and prevents the generated code from interfering with the test (e.g. fork bomb, killing other pro
Evaluation/HumanEval/human_eval/execution.py:659
↓ 1 callers
Function
safe_save_model_for_hf_trainer
Collects the state dict and dump to disk.
finetune/finetune_deepseekcoder.py:42
↓ 1 callers
Function
stream_jsonl_all
Streams a JSONL file.
Evaluation/MBPP/human_eval/evaluation.py:179
↓ 1 callers
Function
stream_jsonl_all
(filename: str)
Evaluation/LeetCode/human_eval/evaluation.py:172
↓ 1 callers
Function
stream_jsonl_all
Streams a JSONL file.
Evaluation/HumanEval/human_eval/evaluation.py:180
↓ 1 callers
Function
swallow_io
()
Evaluation/MBPP/human_eval/execution.py:604
↓ 1 callers
Function
swallow_io
()
Evaluation/LeetCode/human_eval/execution.py:604
↓ 1 callers
Function
swallow_io
()
Evaluation/HumanEval/human_eval/execution.py:604
next →
1–100 of 149, ranked by callers