Library for synthetic data generation
Project description
Code Generation using main_script.py
This script is designed to generate code snippets using various parameters. You can customize the parameters directly in the script or by modifying the JSON file in the config folder. The generated codes are less than the requested because the algorithm drops duplicated ones. Inside prompts folder/prompt_list_and_probabilities can be found the probabilities with which the four different prompts templates are selected, the proportions can be changed in this file.
Parameters
api_key
: Your API key for accessing the code generation service.share
: A dictionary specifying the share of snippets for each language.Total_number
: Total number of snippets to extract.batch_size
: Batch size for parallel processing.n_jobs
: Number of parallel jobs to run (null for automatic detection).model
: The model to use for code generation.temperature_problem
: Temperature for creating the problem text.temperature_solution
: Temperature for creating the solution text.test
: Whether to run in test mode (produces only 6 example generated samples).
Default Values
Here are the default values for each parameter:
api_key
: "aaa"share
: {"Python" : 0.40, "C++" : 0.05, ... }Total_number
: 100batch_size
: 3n_jobs
: nullmodel
: "meta-llama/Llama-3-70b-chat-hf"temperature_problem
: 0.7temperature_solution
: 0.5test
: false
Running the Script
To run the script with the default parameters, use the following command:
python app/main_coder.py
## Author
- Onur Alp Güvercin
- Cesare Bidini
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file data_generation_hyper-0.0.3.6.tar.gz
.
File metadata
- Download URL: data_generation_hyper-0.0.3.6.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54974b08cb24f9a9472b3b84d915d3e4f0720d4d5f24ecfc5d5ac91e3aae7d96 |
|
MD5 | 1c7e31d09d1386bc4473e7c8bb71fde8 |
|
BLAKE2b-256 | 79089494e366f98feb71c2e3b88684c248a43ad9df889dfeae5f595b83710ae0 |
File details
Details for the file data_generation_hyper-0.0.3.6-py3-none-any.whl
.
File metadata
- Download URL: data_generation_hyper-0.0.3.6-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d4968bcf99d8f670eef7cd83608b5fc942f60df7f7ca20edbabd6021fd2f461 |
|
MD5 | dcba5c49f3430a85d1d4ed736703ed68 |
|
BLAKE2b-256 | 3cb04b6d3f55d8fcfa00619548117ebacd5ba4d883b18fe59cab01791a4aa2b5 |