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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: learning performance-improving code edits 馃ェ #65

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

SwayamInSync
Copy link

PR to add LEARNING PERFORMANCE-IMPROVING CODE EDITS with PIE dataset, few shot evaluations for program performance improvement

@Muennighoff
Copy link
Contributor

Nice! Some comments:

  • Remove .pyc .DS_Store and other files from the PR that are not important
  • Can't we upload all those .txt files to the hub? / Do we even need them? This PR adds way too many files imo
  • Can you share any results you got?

@SwayamInSync
Copy link
Author

@Muennighoff Those are test cases and are needed in order to evaluate the correctness of the generated program.

@Muennighoff
Copy link
Contributor

@Muennighoff Those are test cases and are needed in order to evaluate the correctness of the generated program.

I think they should be uploaded to a dataset on the HF Hub that is then loaded like it's done for the other eval tasks

@SwayamInSync
Copy link
Author

SwayamInSync commented Apr 24, 2023

Nice! Some comments:

  • Remove .pyc .DS_Store and other files from the PR that are not important
  • Can't we upload all those .txt files to the hub? / Do we even need them? This PR adds way too many files imo
  • Can you share any results you got?

@Muennighoff

  • .pyc , DS_Store and other irrelevant files are removed
  • test cases are pushed to hub and integrated into the code without creating any variance during runtime evaluation

Author evaluated on Python and C++, but for now, we are only evaluating on Python, since C++ data was not available. I am creating the dataset for C++ too, as its done will push into the hub

Comment on lines 120 to 132
cmd = "git clone https://huggingface.co/datasets/rootacess/pie-perf-testcases lm_eval/tasks/custom_metrics/pie_perf_metric/public_test_cases"
process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
output, error = process.communicate()
logging.error(f'An error occurred: {error}')

# running evaluations
res = compute(generations, references, dataset=self.get_dataset()[:limit])

# cleaning up
cmd = "rm -rf lm_eval/tasks/custom_metrics/pie_perf_metric/public_test_cases"
process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
output, error = process.communicate()
logging.error(error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we load the test cases with HF datasets?
If not at least should check that the path doesn't already exist I think

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to the invariable numbers of test cases per type of problem, it is not suitable to convert it into Dataset format. I can add the condition to check if path exists

@arjunguha arjunguha changed the title Add: LEARNING PERFORMANCE-IMPROVING CODE EDITS 馃ェ Add: learning performance-improving code edits 馃ェ May 23, 2023
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.

None yet

2 participants