A CLI tool to modify and execute Python scripts.
Project description
TuneParams
TuneParams is a command-line tool that allows users to modify and execute Python scripts with customizable parameters.
Features
- Modify parameters dynamically in your Python scripts.
- Run scripts with parameter values specified in the command line or in a separate file.
- Easy integration with existing Python projects.
Installation
You can install TuneParams via pip:
pip install tuneparams
Usage
You can run your ML/Python scripts using 2 methods with TuneParams
.
-
Command Line Parameters: Specify the parameters you want to change directly in the command prompt. For example, if you want to test 10 different parameter combinations like
random_state=33, min_depth=41
,n_estimators=11
, andtest_size=0.4
, you can provide them as follows:tuneparams <script.py> param1=value1 param2=value2 ...
-
Parameter File: Alternatively, you can create a file containing all possible combinations of parameters and use it to run
TuneParams
. The file should have each parameter set separated by commas, and each combination in a new line. You can run them as follows:tuneparams <script.py> --param-file <file.txt>
Note: In the parameter file, each line should contain parameters in the format
param1=value1, param2=value2, ...
.
Examples
Command Line Example
tuneparams my_script.py learning_rate=0.01 epochs=10
Parameter File Example
Create a file params.txt
with the following content:
learning_rate=0.01, epochs=10
learning_rate=0.1, epochs=5
Then run:
tuneparams my_script.py --param-file params.txt
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue.
Project details
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 tuneparams-0.2.2.tar.gz
.
File metadata
- Download URL: tuneparams-0.2.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 354b864ba4667759efa033f0a6a98c11f372552e651360df06099fc08edda108 |
|
MD5 | 8246884b084de7f6582f5875d467de75 |
|
BLAKE2b-256 | b95dd45631a7910797ae5111dc74e0d130105de2ff39c9d67b266ebbd19d55b0 |
File details
Details for the file tuneparams-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: tuneparams-0.2.2-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d1a5aaca991f64a396d1b381fc5ad8d4126c25c15e360bb0865863cf304b0ec |
|
MD5 | e77c5d1b61d78ffc6e1793cbbf0c3f9c |
|
BLAKE2b-256 | 5237585aa7287e57a217aa68f635ba40467e858f8db8cc73723ba0dace89d070 |