-
Notifications
You must be signed in to change notification settings - Fork 9
Getting started tutorial
Welcome to the WaveDiff tutorial!
This tutorial serves as a walk-through guide of how to set up runs of WaveDiff with different configuration settings.
The WaveDiff pipeline is launched and managed by wf_psf/run.py script.
A list of command-line arguments can be displayed using the --help option:
> python wf_psf/run.py --help
usage: run.py [-h] --conffile CONFFILE --repodir REPODIR --outputdir OUTPUTDIR
optional arguments:
-h, --help show this help message and exit
--conffile CONFFILE, -c CONFFILE
a configuration file containing program settings.
--repodir REPODIR, -r REPODIR
the path of the code repository directory.
--outputdir OUTPUTDIR, -o OUTPUTDIR
the path of the output directory.
There are three arguments, which the user should specify when launching the pipeline.
The first argument: --confile CONFFILE specifies the path to the configuration file storing the parameter options for running the pipeline.
The second argument: --repodir REPODIR is the path to the wf-psf repository.
The third argument: --outputdir OUTPUTDIR is used to set the path to the output directory, which stores the WaveDiff results.
To run WaveDiff, use the following command:
> python wf_psf/run.py -c /path/to/config/file -r /path/to/wf-psf -o /path/to/output/dir
You can test this now using the configuration file configs.yaml provided in the subdirectory config inside the wf-psf repository. Launching this script will initiate training of the semi parametric DataDriven PSF model. The outputs will be stored in a directory called wf-outputs located in path specified with the argument -o.
Next, we describe to some detail the configuration file structures and content.
The WaveDiff pipeline features various packages which can be used to train parametric and DataDriven PSF models, perform metrics evaluation of the trained PSF model, and generate plots for the various metrics. To configure WaveDiff for a particular run or a set of runs, the user can simply specify the processing step(s) by setting the values of the associated {processing_type}_conf variables in the master configs.yaml file:
---
training_conf: config/training_config.yaml
metrics_conf: config/metrics_config.yaml
plotting_conf: config/plotting_config.yaml
and providing the corresponding configuration files. Each configuration file contains the only those parameters required for the processing step. While the input configuration files into WaveDiff are constructed using YAML (Yet Another Markup Language), for logging we use the ini file syntax. We show the complete config directory tree below
config
├── configs.yaml
├── logging.conf
├── metrics_config.yaml
├── plotting_config.yaml
└── training_config.yaml
As WaveDiff is currently undergoing a refactoring in UI, only the training part of the pipeline is functional. Therefore, the code will only activate the training part of the pipeline.
We now review the parameter arguments in the training_config.yaml.