The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 4 new columns ({'submission_id_v0', 'cpu_time_v1', 'problem_id', 'cpu_time_v0'}) and 3 missing columns ({'commit', 'non_functional_requirement', 'commit_message'}).
This happened while the json dataset builder was generating data using
hf://datasets/ManavSinghal157/NoFunEval/datasets/runtime_efficiency.jsonl (at revision d04f68f57069d92822d45d1e91378b56977811d7)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1869, in _prepare_split_single
writer.write_table(table)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 580, in write_table
pa_table = table_cast(pa_table, self._schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2292, in table_cast
return cast_table_to_schema(table, schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2240, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
problem_id: string
submission_id_v0: string
cpu_time_v1: string
cpu_time_v0: string
source_code: string
target_code: string
chain_of_thought: string
one_shot: string
base_prompt: string
coding_concepts: string
pl: string
classification_left_prompt: string
classification_left_label: string
classification_right_prompt: string
classification_right_label: string
to
{'non_functional_requirement': Value(dtype='string', id=None), 'commit': Value(dtype='string', id=None), 'commit_message': Value(dtype='string', id=None), 'source_code': Value(dtype='string', id=None), 'target_code': Value(dtype='string', id=None), 'pl': Value(dtype='string', id=None), 'chain_of_thought': Value(dtype='string', id=None), 'one_shot': Value(dtype='string', id=None), 'base_prompt': Value(dtype='string', id=None), 'coding_concepts': Value(dtype='string', id=None), 'classification_left_prompt': Value(dtype='string', id=None), 'classification_left_label': Value(dtype='string', id=None), 'classification_right_prompt': Value(dtype='string', id=None), 'classification_right_label': Value(dtype='string', id=None)}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1392, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1041, in convert_to_parquet
builder.download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 924, in download_and_prepare
self._download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 999, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1740, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1871, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 4 new columns ({'submission_id_v0', 'cpu_time_v1', 'problem_id', 'cpu_time_v0'}) and 3 missing columns ({'commit', 'non_functional_requirement', 'commit_message'}).
This happened while the json dataset builder was generating data using
hf://datasets/ManavSinghal157/NoFunEval/datasets/runtime_efficiency.jsonl (at revision d04f68f57069d92822d45d1e91378b56977811d7)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
non_functional_requirement string | commit string | commit_message string | source_code string | target_code string | pl string | chain_of_thought string | one_shot string | base_prompt string | coding_concepts string | classification_left_prompt string | classification_left_label string | classification_right_prompt string | classification_right_label string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
framerate | https://github.com/onyxbits/listmyaps/commit/5065990868de934c2c9aa5dfce01b69b362eb94e | '\\"BUGFIX: Recycle views to scroll faster\\n\\"' | package de.onyxbits.listmyapps;
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.TextView;
public class AppAdapter extends Array... | package de.onyxbits.listmyapps;
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.CheckBox;
import android.widget.TextView;
public class AppAdapter extends Array... | Java | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the frame rate. Write the entire code and no other text.
```java
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; i... | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the frame rate. Write the entire code and no other text.
```java
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; i... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given java program to optimize and improve the frame rate. Write the entire code and no other text in the response.
```java
package de.onyxbits.listmyapps;
import java.util.List;
imp... | Below is an instruction that describes a task. The instruction contains concepts formatted as a list of keyword and value pairs separated by newline. The list of concept keywords and their descriptions are:
### Keywords:
[in] What specific function or class to focus on to implement the required change(s).
[+] What s... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower frame rate.
Code-A:
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* This Source Code Form is subject to the terms ... | A | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower frame rate.
Code-A:
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* This Source Code Form is subject to the terms ... | B |
executiontime | https://github.com/aaronjwood/PortAuthority/commit/251e9ea3d07dfe09c911041ee841d78acbfa5eba | '\\"Use a socket connection when scanning for hosts instead of isReachable. Set performance options to prefer fast connection. Enable TCP_NODELAY\\n\\"' | package com.aaronjwood.portauthority.runnable;
import com.aaronjwood.portauthority.response.MainAsyncResponse;
import java.io.IOException;
import java.net.InetAddress;
public class ScanHostsRunnable implements Runnable {
private static final String TAG = "ScanHostsRunnable";
private String[] ipParts;
p... | package com.aaronjwood.portauthority.runnable;
import com.aaronjwood.portauthority.response.MainAsyncResponse;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
public class ScanHostsRunnable implements Runnable {
private static final String TAG = "ScanHostsRunnable";
p... | Java | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given java program to optimize and improve the execution time. Write the entire code and no other text in the response.
```java
package com.aaronjwood.portauthority.runnable;
import c... | Below is an instruction that describes a task. The instruction contains concepts formatted as a list of keyword and value pairs separated by newline. The list of concept keywords and their descriptions are:
### Keywords:
[in] What specific function or class to focus on to implement the required change(s).
[+] What s... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower frame rate.
Code-A:
package de.onyxbits.listmyapps;
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
impo... | A | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower frame rate.
Code-A:
package de.onyxbits.listmyapps;
import java.util.List;
import android.content.Context;
import android.view.LayoutInflater;
impo... | B |
executiontime | https://github.com/aaronjwood/PortAuthority/commit/e37a1a522a15773710f051d9fff5c0ce68ade5cb | '\\"Java can often do more optimizations to things outside of try blocks. Take more advantage of the JIT\\n\\"' | package com.aaronjwood.portauthority.runnable;
import com.aaronjwood.portauthority.response.MainAsyncResponse;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
public class ScanHostsRunnable implements Runnable {
private String[] ipParts;
private int start;
private i... | package com.aaronjwood.portauthority.runnable;
import com.aaronjwood.portauthority.response.MainAsyncResponse;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
public class ScanHostsRunnable implements Runnable {
private String[] ipParts;
private int start;
private i... | Java | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given java program to optimize and improve the execution time. Write the entire code and no other text in the response.
```java
package com.aaronjwood.portauthority.runnable;
import c... | Below is an instruction that describes a task. The instruction contains concepts formatted as a list of keyword and value pairs separated by newline. The list of concept keywords and their descriptions are:
### Keywords:
[in] What specific function or class to focus on to implement the required change(s).
[+] What s... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower execution time.
Code-A:
package com.aaronjwood.portauthority.runnable;
import android.util.Log;
import com.aaronjwood.portauthority.response.HostAs... | A | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower execution time.
Code-A:
package com.aaronjwood.portauthority.runnable;
import android.util.Log;
import com.aaronjwood.portauthority.response.HostAs... | B |
executiontime | https://github.com/vaginessa/TestBrowser-Lightning/commit/d68ab94bbb4ac5a4ccdca5771b5c12603773b125 | '\\"Optimize LicenseActivity\\n\\"' | /*
* Copyright 2014 A.C.R. Development
*/
package acr.browser.lightning;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
... | /*
* Copyright 2014 A.C.R. Development
*/
package acr.browser.lightning;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
/*
*NOTE: This activity must not be removed in order to comply with the Mozi... | Java | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given java program to optimize and improve the execution time. Write the entire code and no other text in the response.
```java
/*
* Copyright 2014 A.C.R. Development
*/
package acr.... | Below is an instruction that describes a task. The instruction contains concepts formatted as a list of keyword and value pairs separated by newline. The list of concept keywords and their descriptions are:
### Keywords:
[in] What specific function or class to focus on to implement the required change(s).
[+] What s... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower execution time.
Code-A:
package com.aaronjwood.portauthority.runnable;
import com.aaronjwood.portauthority.response.MainAsyncResponse;
import java.... | A | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower execution time.
Code-A:
package com.aaronjwood.portauthority.runnable;
import com.aaronjwood.portauthority.response.MainAsyncResponse;
import java.... | B |
executiontime | https://github.com/aaronjwood/PortAuthority/commit/0eb3cc570e3898cf681d12cf399ab040aea16e8f | '\\"For larger scans a fixed thread pool provides better performance\\n\\"' | package com.aaronjwood.portauthority.async;
import android.os.AsyncTask;
import com.aaronjwood.portauthority.response.HostAsyncResponse;
import com.aaronjwood.portauthority.runnable.ScanPortsRunnable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Time... | package com.aaronjwood.portauthority.async;
import android.os.AsyncTask;
import com.aaronjwood.portauthority.response.HostAsyncResponse;
import com.aaronjwood.portauthority.runnable.ScanPortsRunnable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Time... | Java | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given java program to optimize and improve the execution time. Write the entire code and no other text in the response.
```java
package com.aaronjwood.portauthority.async;
import andr... | Below is an instruction that describes a task. The instruction contains concepts formatted as a list of keyword and value pairs separated by newline. The list of concept keywords and their descriptions are:
### Keywords:
[in] What specific function or class to focus on to implement the required change(s).
[+] What s... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower execution time.
Code-A:
package com.aaronjwood.portauthority.runnable;
import com.aaronjwood.portauthority.response.MainAsyncResponse;
import java.... | A | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower execution time.
Code-A:
package com.aaronjwood.portauthority.runnable;
import com.aaronjwood.portauthority.response.MainAsyncResponse;
import java.... | B |
executiontime | https://github.com/erikusaj/fdroidTvClient/commit/e085e0392bfb5b476ab114382663a7ca7fd5ce4e | '\\"PackageReceiver: Only fetch the one PackageInfo\\n\\nWe were fetching information on all installed packages and doing a linear\\nsearch. Which is silly and inefficient since we can directly fetch information\\non a single installed package by id.\\n\\"' | /*
* Copyright (C) 2014 Ciaran Gultnieks, ciaran@ciarang.com,
* Peter Serwylo, peter@serwylo.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (... | /*
* Copyright (C) 2014 Ciaran Gultnieks, ciaran@ciarang.com,
* Peter Serwylo, peter@serwylo.com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 3
* of the License, or (... | Java | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task along with an example. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given Java program to optimize and improve the execution time. Write the entire code and no other text.
```java
package com.aaronjwood.portauthority.runnable;
im... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Rewrite the given java program to optimize and improve the execution time. Write the entire code and no other text in the response.
```java
/*
* Copyright (C) 2014 Ciaran Gultnieks, ciaran@ciara... | Below is an instruction that describes a task. The instruction contains concepts formatted as a list of keyword and value pairs separated by newline. The list of concept keywords and their descriptions are:
### Keywords:
[in] What specific function or class to focus on to implement the required change(s).
[+] What s... | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower execution time.
Code-A:
/*
* Copyright 2014 A.C.R. Development
*/
package acr.browser.lightning;
import android.app.Activity;
import android.conte... | A | Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Only one of the two code snippets has a lower execution time.
Code-A:
/*
* Copyright 2014 A.C.R. Development
*/
package acr.browser.lightning;
import android.app.Activity;
import android.conte... | B |
executiontime | https://github.com/ThaiCao/EasyWatermark/commit/b822502acf65173418081102a04c7faabb632379 | "'\\\\\":zap: :bug:\\\\n[Update]\\\\n- Optimize logo view performance.\\\\n[Fix]\\\\n- Fix the flash(...TRUNCATED) | "package me.rosuh.easywatermark.widget\n\nimport android.animation.ObjectAnimator\nimport android.an(...TRUNCATED) | "package me.rosuh.easywatermark.widget\n\nimport android.animation.ObjectAnimator\nimport android.an(...TRUNCATED) | Kotlin | "Below is an instruction that describes a task along with an example. Write a response that appropri(...TRUNCATED) | "Below is an instruction that describes a task along with an example. Write a response that appropri(...TRUNCATED) | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | "Below is an instruction that describes a task. The instruction contains concepts formatted as a lis(...TRUNCATED) | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | A | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | B |
executiontime | https://github.com/aaronjwood/PortAuthority/commit/ef46ba248bd73d52e071e53e9352e9cc0cd3694b | '\\"Reduce timeout\\n\\"' | "package com.aaronjwood.portauthority.async;\n\nimport android.content.Context;\nimport android.os.A(...TRUNCATED) | "package com.aaronjwood.portauthority.async;\n\nimport android.content.Context;\nimport android.os.A(...TRUNCATED) | Java | "Below is an instruction that describes a task along with an example. Write a response that appropri(...TRUNCATED) | "Below is an instruction that describes a task along with an example. Write a response that appropri(...TRUNCATED) | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | "Below is an instruction that describes a task. The instruction contains concepts formatted as a lis(...TRUNCATED) | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | A | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | B |
framerate | https://github.com/erikusaj/fdroidTvClient/commit/26b35723d30b5d9e5b7fddfdacbcb475db2da0bb | "'\\\\\"use AsyncTask for SwapType operations to run in background\\\\n\\\\nThread runs at normal pr(...TRUNCATED) | "package org.fdroid.fdroid.localrepo.type;\n\nimport android.content.Context;\nimport android.conten(...TRUNCATED) | "package org.fdroid.fdroid.localrepo.type;\n\nimport android.content.Context;\nimport android.conten(...TRUNCATED) | Java | "Below is an instruction that describes a task along with an example. Write a response that appropri(...TRUNCATED) | "Below is an instruction that describes a task along with an example. Write a response that appropri(...TRUNCATED) | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | "Below is an instruction that describes a task. The instruction contains concepts formatted as a lis(...TRUNCATED) | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | A | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | B |
executiontime | https://github.com/aaronjwood/PortAuthority/commit/44a588294f7ab129eb50de23897a348e114fc30b | "'\\\\\"Set performance options to prefer fast connection when scanning ports. Enable TCP_NODELAY\\\(...TRUNCATED) | "package com.aaronjwood.portauthority.runnable;\n\nimport com.aaronjwood.portauthority.response.Host(...TRUNCATED) | "package com.aaronjwood.portauthority.runnable;\n\nimport com.aaronjwood.portauthority.response.Host(...TRUNCATED) | Java | "Below is an instruction that describes a task along with an example. Write a response that appropri(...TRUNCATED) | "Below is an instruction that describes a task along with an example. Write a response that appropri(...TRUNCATED) | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | "Below is an instruction that describes a task. The instruction contains concepts formatted as a lis(...TRUNCATED) | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | A | "Below is an instruction that describes a task. Write a response that appropriately completes the re(...TRUNCATED) | B |
NoFunEval: Funny How Code LMs Falter on Requirements Beyond Functional Correctness
[Published at COLM'24]
Abstract:
Existing evaluation benchmarks of language models of code (code LMs) focus almost exclusively on whether the LMs can generate functionally-correct code. In real-world software engineering, developers think beyond functional correctness. They have requirements on "how" a functionality should be implemented to meet overall system design objectives like efficiency, security, and maintainability. They would also trust the code LMs more if the LMs demonstrate robust understanding of such requirements.
We propose a new benchmark NoFunEval to evaluate code LMs on non-functional requirements and simple classification instances for both functional and non-functional requirements. We propose a prompting method, Coding Concepts (CoCo), as a way for a developer to communicate the domain knowledge to the LMs. We conduct an extensive evaluation of twenty-two code LMs. Our finding is that they generally falter when tested on our benchmark, hinting at fundamental blindspots in their training setups. Surprisingly, even the classification accuracy on functional-correctness instances derived from the popular HumanEval benchmark is low, calling in question the depth of their comprehension and the source of their success in generating functionally-correct code in the first place.
Arxiv: https://arxiv.org/pdf/2401.15963.pdf
Github: http://aka.ms/nofuneval
Generation
Environment Setup
Create a virtual environment.
bash setup.sh
NoFunEdit
python3 src/nofunedit_generation.py --data_subset <subset from nofunedit: eg-latency> --model_path <model name from HF: eg-WizardLM/WizardCoder-15B-V1.0> --temperature <temperature to be set for model generation: eg-0> --max_new_tokens <maximum number of new tokens to be generated: eg-5192> --prompt <type of prompt to use from our dataset: eg-base_prompt> --num_samples <number of samples to be generated: eg-1> --precision <floating point format: eg-fp16> --batch_size <number of examples to send to llm engine at once: eg-1>
Classification
python3 src/classification_generation.py --data_subset <subset from non_func or humanevalclassify: eg-latency> --model <model name from HF: eg-WizardLM/WizardCoder-15B-V1.0> --temperature <temperature to be set for model generation: eg-0> --max_new_tokens <maximum number of new tokens to be generated: eg-5192> --prompt <type of prompt to use from our dataset: eg-base_prompt> --precision <floating point format: eg-fp16> --batch_size <number of examples to send to llm engine at once: eg-1>
Evaluation Scripts
Evaluation
python3 src/evaluation.py --data_subset <subset from nofunedit: eg-latency> --model_path <model name from HF: eg-WizardLM/WizardCoder-15B-V1.0> --prompt <type of prompt to use from our dataset: eg-base_prompt> --num_samples <number of samples to be generated: eg-1> --score_k <K values for score@k: eg-1,5,10,20> --metric <eval_metric to be used: eg-diffbleu>
Example eval script (For maintainability)
bash evaluation_example_script.sh
Parameters
| Parameter | Description |
|---|---|
data_subset |
The subset of data to use. Options: latency, resource_util, maintainability, security, runtime_efficiency for nofunedit. Additionally humanevalclassify for classification. |
model_path |
The path of the model from HF. Example: WizardLM/WizardCoder-15B-V1.0. |
prompt |
Prompt to use. Options: base_prompt, one-shot, chain_of_thought, coding_concepts. |
num_samples |
Number of samples to generate. Example: 1 (We used 1 for greedy and 20 for higher temperature). [NoFunEdit - Generation only] |
max_new_tokens |
Budget for new token generation for a model. Example: 1200 (NoFunEdit: We used 1200 for runtime_efficiency and security for all prompts than CoT where 1500 was used. For others, we used 5192 or max possible limit. Classification: We used 4 for all generations). |
temperature |
Temperature for model generation. Example: 0 (We used 0 for greedy and 0.8 for higher samples) |
score_k |
K vales for Score@K. Example: 1,5,10,20 (Should not be greater than num_samples and is comma separated) [Eval only] |
metric |
Metric to be used for evaluation. Option: diffbleu, codeql, codeql-diffbleu (to be run after first two params are run), classification, runtime [Eval only] |
VLLM Parameters (for generation)
| Parameter | Description |
|---|---|
batch-size |
Batch size. Default: 1 |
precision |
Floating point format: Default: fp16 |
tensor_parallel_size |
Default: 1 |
swap_space |
The size (GiB) of CPU memory per GPU to use as swap space: Default: 4 |
- Downloads last month
- 932