Skip to main content

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.

  1. 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, and test_size=0.4, you can provide them as follows:

    tuneparams <script.py> param1=value1 param2=value2 ...
    
  2. 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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

tuneparams-0.2.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

tuneparams-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file tuneparams-0.2.0.tar.gz.

File metadata

  • Download URL: tuneparams-0.2.0.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

Hashes for tuneparams-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5a276fffe063628e162fcfd540da818ef481a45ad1b2a452c898efd191958ff3
MD5 3ab1f0d03bb807f33e551eb70b3fb7c1
BLAKE2b-256 0f8f7a3ac8775af86a12be1a563772adb14e28a6e3740e1154f1df672ad0dbce

See more details on using hashes here.

File details

Details for the file tuneparams-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tuneparams-0.2.0-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

Hashes for tuneparams-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e180ec653a821cf2d895f40691ef14c5aa9ee6c6258d108c08dd8ee20f8dc15
MD5 e88f2230baaa32136cead712c20a2790
BLAKE2b-256 1f688f9365c1b0e82197022a71b74e399c29368c581bd3bd09c68e2aa61a67bc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page