This work accompanies the corresponding Scratch repository. Within this specific repository, the LR module - responsible for calculating the appropriate statistical data - is provided.
From the lrmodule python module, several public API methods are exposed:
get_lr_system: load a trained LR system from disk from a given folder;get_reference_data: load reference data from disk;get_validation_experiment: return anExperimentthat builds and validates a model.
- Install all dependencies using
pdm sync -G dev(to install dev dependencies as well) - Run checks with
pdm run checkorpdm check-qualityto automatically fix the things as well - Run tests with
pdm run test - To run everything
pdm run all(no auto fixes) or with fixes:pdm run all-fix
All typing, linting and formatting configuration was taken from the Scratch repository for seamless integration.
- Update hyperparameters, experiment setup and data path as needed in
models/[NAME]/validation.yaml; - Run validation experiments as
pdm run lir models/[NAME]/validation.yaml; - Inspect the results in the output folder;
- When satisfied, update the stored model (TODO).
For example, instead of pdm run lir models/[NAME]/validation.yaml:
- Create a new 'Run/Debug configuration', with the following settings:
- Select the 'Python' template/default to start from
- Instead of 'script' select 'module', and specify
lir - As 'Script parameters', specify
lrmodule/models/[NAME]/validation.yaml - Make that the path to this repo is used as 'Working directory'
See the PyCharm documentation for more info.