Skip to content

Add mbpp#801

Open
Muennighoff wants to merge 42 commits into
bigscience-workshop:eval-hackathonfrom
Muennighoff:mbpp
Open

Add mbpp#801
Muennighoff wants to merge 42 commits into
bigscience-workshop:eval-hackathonfrom
Muennighoff:mbpp

Conversation

@Muennighoff
Copy link
Copy Markdown

Adds mbpp. I kept it simple as the function instructions are already very diverse.

cc @haileyschoelkopf @thomasw21 @lintangsutawika

Two examples:

('Write a function to find the minimum cost path to reach (m, n) from (0, 0) for the given cost matrix cost[][] and a position (m, n) in cost[][]. Here is a solution in Python:', ['R = 3\r\nC = 3\r\ndef min_cost(cost, m, n): \r\n\ttc = [[0 for x in range(C)] for x in range(R)] \r\n\ttc[0][0] = cost[0][0] \r\n\tfor i in range(1, m+1): \r\n\t\ttc[i][0] = tc[i-1][0] + cost[i][0] \r\n\tfor j in range(1, n+1): \r\n\t\ttc[0][j] = tc[0][j-1] + cost[0][j] \r\n\tfor i in range(1, m+1): \r\n\t\tfor j in range(1, n+1): \r\n\t\t\ttc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j] \r\n\treturn tc[m][n]'])
Running prompt: function solved
('Write a function to find the minimum cost path to reach (m, n) from (0, 0) for the given cost matrix cost[][] and a position (m, n) in cost[][]. This can be solved in Python with the following code:', ['R = 3\r\nC = 3\r\ndef min_cost(cost, m, n): \r\n\ttc = [[0 for x in range(C)] for x in range(R)] \r\n\ttc[0][0] = cost[0][0] \r\n\tfor i in range(1, m+1): \r\n\t\ttc[i][0] = tc[i-1][0] + cost[i][0] \r\n\tfor j in range(1, n+1): \r\n\t\ttc[0][j] = tc[0][j-1] + cost[0][j] \r\n\tfor i in range(1, m+1): \r\n\t\tfor j in range(1, n+1): \r\n\t\t\ttc[i][j] = min(tc[i-1][j-1], tc[i-1][j], tc[i][j-1]) + cost[i][j] \r\n\treturn tc[m][n]'])
@Muennighoff Muennighoff changed the title Mbpp Add mbpp Jul 18, 2022
@haileyschoelkopf
Copy link
Copy Markdown

Thanks for doing this! It looks good

@Muennighoff
Copy link
Copy Markdown
Author

The dataset download is currently failing.
It works for me on Colab. Probably adding ignore_verifications=True. to the load_dataset used in the test would make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants