handles jsons creation and management
Project description
Json_Manager
The purpose of the project is to provide a single package that handles experimental setups for your work. The structure of a set of experiments is as follows. We have a folder path_to_information
which will contain the different options for our experiments (is it running? hyper-parameters,...) and a folder exp_folder
which will contain one json file per-exp.
To have a simple and straight-forward way to create and manage the files, we use pynput which requires some authorization at installation (see this link for more information).
Installation
You have two options: either git clone or pip install using
pip install pynput-json-manager
Tutorial (for git clone or submodule)
I made a tutorial (you can copy/paste the CLI from the video demo) for this package. In the tutorial, we create experiments which will depend on three parameters. The first one is an integer with default value 2, the second is bool with default value True and the last is a flaot with default value 2.5 (and only values of .0 or 0.5 are accepted). Then we create three experiments, before deleting one and removing the second option (the bool option).
In the tutorial, we show how you can navigate when generating exp (i use the arrows of the keyboard) and type values when setting float/int variables.
Tutorial (for pip installation)
I also made a tutorial for the use after pip install. In the case of pip install, the base command becomes
python -m pynput_json_manager.manage_jsons
How to use
We can do several things here
- get a summary of all the experiments available
- add a new options for old and future experiements
- generate new experiments
- delete old experiments
- delete parameters in all experiments
- reset experiments values to default (in order to restart experiments for example)
For all cli command, you can add the following arguments --exp_folder
and --path_to_information
to have a custom folder naming. Note that if the folders don't exist they are created by the program.
summary of all experiments
simply run
python -m src.pynput_json_manager.manage_jsons --status
or use get_status(exp_folder, path_to_information)
add option
simply run
python -m src.pynput_json_manager.manage_jsons --add_param
or use add_parameters_to_exps(exp_folder, path_to_information)
generate a new exp
simply run
python -m src.pynput_json_manager.manage_jsons --generate
or use create_exp(exp_folder, path_to_information)
delete experiments
simply run
python -m src.pynput_json_manager.manage_jsons --delete
or use delete_exps(exp_folder, path_to_information)
delete parameters
simply run
python -m src.pynput_json_manager.manage_jsons --delete_param
or use delete_key_in_exps(exp_folder, path_to_information)
reset experiments
simply run
python -m src.pynput_json_manager.manage_jsons --reset arg1 arg2
or use reset_exps(exp_folder, path_to_information, keys_to_reset)
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 pynput_json_manager-0.0.7.tar.gz
.
File metadata
- Download URL: pynput_json_manager-0.0.7.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3dc8ba5fe84146de78d3e739e78b7c4803758c858e977c5fa8e581f9410ccf6 |
|
MD5 | 6e6da09530d9bfa750f43dd4353529a2 |
|
BLAKE2b-256 | 53cea127fa61b4b5f8bb5d8415d51205200df8d47e427d6b9a1a4877609cd1c2 |
File details
Details for the file pynput_json_manager-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: pynput_json_manager-0.0.7-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40ba1d53b620065a7f3f62a46d3b54353c7f3b39c0de54f4229c3511bee2fa68 |
|
MD5 | 1401fc2673a01ddc5bc8e32e63bc8a62 |
|
BLAKE2b-256 | fb4120cc2363edcaeecc028ba0a4f608a50b70eee81adb2ebec0282730da2284 |