Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Codeparrot/githubpairs & co #819

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant