mirror of
https://github.com/GammaTauAI/reflexion-human-eval
synced 2024-11-11 19:10:53 +00:00
Updated LeetExecutor
This commit is contained in:
parent
b579fd61e0
commit
c52741524c
@ -4,8 +4,7 @@ from .py_executor import PyExecutor
|
||||
from .rs_executor import RsExecutor
|
||||
from .leet_executor import LeetExecutor
|
||||
from .executor_types import Executor
|
||||
from .executor_utils import PySubmissionFormatter, RsSubmissionFormatter
|
||||
|
||||
from .leetcode_env.leetcode_env.utils import PySubmissionFormatter, RsSubmissionFormatter
|
||||
|
||||
def executor_factory(lang: str, is_leet: bool = False) -> Executor:
|
||||
if lang == "py" or lang == "python":
|
||||
|
@ -1,7 +1,7 @@
|
||||
from typing import List
|
||||
|
||||
from .executor_types import ExecuteResult, Executor
|
||||
from .executor_utils import SubmissionFormatter
|
||||
from .leetcode_env.leetcode_env.utils import SubmissionFormatter
|
||||
|
||||
from .leetcode_env.leetcode_env.environment import LeetCodeEnv
|
||||
from .leetcode_env.leetcode_env.leetcode_types import ProgrammingLanguage, LeetCodeSubmission
|
||||
@ -21,7 +21,7 @@ class LeetExecutor(Executor):
|
||||
submission = LeetCodeSubmission(
|
||||
code = self.formatter.to_leetcode(func),
|
||||
lang = self.lang,
|
||||
question_id = id_from_slug(name),
|
||||
question_id = id_from_slug(name, self.env.api_instance),
|
||||
question_slug = name,
|
||||
timeout = timeout
|
||||
)
|
||||
|
10
run_simple_py_leet.sh
Executable file
10
run_simple_py_leet.sh
Executable file
@ -0,0 +1,10 @@
|
||||
python main.py \
|
||||
--run_name "simple_leetcode_python3" \
|
||||
--root_dir "root" \
|
||||
--dataset_path ./executors/leetcode_env/leetcode_dataset/data/humaneval/leetcode-hard-py-40-uncontaminated.jsonl \
|
||||
--strategy "simple" \
|
||||
--language "py" \
|
||||
--model "gpt-4" \
|
||||
--pass_at_k "1" \
|
||||
--max_iters "1" \
|
||||
--verbose
|
Loading…
Reference in New Issue
Block a user