Skip to content

Codeparrot/githubpairs & co #819

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 37 commits into
base: eval-hackathon
Choose a base branch
from

Conversation

Muennighoff
Copy link

@Muennighoff Muennighoff commented Aug 24, 2022

APPS requires mapping the dataset to the below:

def add_solution_apps(example):
    example["solution"] = random.choice(json.loads(example["solutions"]))
    return example

XLCost requires mapping the dataset to the below:

def clean_code_xlcost(example):
    clean_lines = []
    cur_indent = 0
    for line in example["code"].split("NEW_LINE"):
        cur_indent += line.count("INDENT")
        cur_indent -= line.count("DEDENT")
        line = line.replace("INDENT", "").replace("DEDENT", "")
        line = line.replace("STRNEWLINE", "\n")
        line = line.replace("TABSYMBOL", "\t")
        clean_lines.append("\t" * cur_indent + line.strip())
    example["code_clean"] = "\n".join(clean_lines)
    return example

@Muennighoff Muennighoff changed the base branch from main to eval-hackathon August 24, 2022 13:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant