Skip to main content

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

pynput_json_manager-0.0.7.tar.gz (19.5 kB view hashes)

Uploaded Source

Built Distribution

pynput_json_manager-0.0.7-py3-none-any.whl (24.6 kB view hashes)

Uploaded Python 3

Supported by

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