Comments (8)
Hi this isn't an error in the dataset, to load it in HuggingFace hub and respect some format constraints we had to save the solutions and input_output columns in json format which led to this behaviour. But in the README of the dataset we show how to load the solutions and input_output columns correctly: https://huggingface.co/datasets/codeparrot/apps#how-to-use-it
from apps.
We filtered when we collected the solutions to check if they pass the testcases however they may be horribly inefficient such as requiring several gigabytes of RAM to execute or take a really long time to execute (sometimes minutes). This varied based on the source of the ground truth solutions. We didn't filter the solutions further to only those that were optimal or near optimal.
from apps.
I see. I was running evaluation by generating code by simply copying first ground truth solution this way:
from datasets import load_dataset
import json
ds = load_dataset("codeparrot/apps", split="train")
examples = {}
for eg in ds:
for sol in eg['solutions'][2:-2].split('", "'):
sol = sol.replace('\\n', '\n')
examples[eg['problem_id']] = [sol]
print ('='*10)
print (sol)
break
json.dump(examples, open('results/all_codes_orig_train.json','w'))
And when I run evaluation for these codes, I only got 60%. Does this seem right?
from apps.
You may need to select a different solution to test out. I can rerun the evaluation script to see how many optimal solutions. I might not be able to get to it for a while though as I'll need the compute in the background to re-evaluate all of the solutions and with sufficient RAM etc. So I can't really give an ETA on that.
from apps.
Okay, btw I see that the low 60% is due to some problems with '' character used unnecessarily in solutions at some places.
from apps.
Update: Doing sol = sol.replace('\n', '\n').replace('\"','"').replace('\r','').replace('\\','\').replace('\t','\t') has pushed it to >95% when I tested on first few training samples.
from apps.
Great thanks for the information. I thought we did that for our preprocessing but maybe something happened where it got removed.
Feel free to make a PR with the changes if you have time :)
from apps.
@loubnabnl Thanks for the input! Leaving the issue closed.
from apps.
Related Issues (20)
- Request for pretrained models HOT 2
- DeepSpeed config and TrainingArguments mismatch HOT 2
- Show a data instance in the readme HOT 2
- Computation of the accuracy scores when there are compilation and runtime errors HOT 7
- evaluation on multiple solutions at once causes memory leak HOT 14
- Nan test case average HOT 5
- Running instructions HOT 4
- Request for scripts of fine-tuning HOT 3
- Problems with fine-tuning
- Problems With APPS HOT 4
- Too Long Problems HOT 8
- Unable to run pre-trained (1.5B) model on test set HOT 2
- answer_type calculation is different for train/val and eval HOT 1
- Steps About Generated Code Solutions Post-processing HOT 1
- About Solutiions' validity HOT 1
- check5 in function "run_test" seem to bring some wrong result HOT 2
- Can this dataset test for chatgpt?(gpt 3.5?) HOT 10
- Problem in ground-truth solutions HOT 2
- Do I need to still reindent if I'm using the APPS dataset hosted on HuggingFace? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apps.