Get sanitized MBPP from Google's Github repo.
()
| 159 | |
| 160 | |
| 161 | def get_mbpp() -> Dict[str, Dict]: |
| 162 | """Get sanitized MBPP from Google's Github repo.""" |
| 163 | mbpp_path = os.path.join(CACHE_DIR, "sanitized-mbpp.json") |
| 164 | |
| 165 | if not os.path.exists(mbpp_path): |
| 166 | os.makedirs(CACHE_DIR, exist_ok=True) |
| 167 | |
| 168 | # Install MBPP-sanitized from scratch |
| 169 | print("Downloading original MBPP dataset...") |
| 170 | wget.download( |
| 171 | "https://github.com/google-research/google-research/raw/master/mbpp/sanitized-mbpp.json", |
| 172 | mbpp_path, |
| 173 | ) |
| 174 | |
| 175 | with open(mbpp_path, "r") as f: |
| 176 | mbpp = json.load(f) |
| 177 | |
| 178 | return {str(task["task_id"]): task for task in mbpp} |
| 179 | |
| 180 | |
| 181 | def get_mbpp_plus( |
no outgoing calls
no test coverage detected