redmod-team / profit

Probabilistic Response mOdel Fitting with Interactive Tools
https://profit.readthedocs.io
MIT License
14 stars 9 forks source link

refactor run system API #173

Closed Rykath closed 1 year ago

Rykath commented 1 year ago

Goals

simplify run components by:

Major Changes

some run components now have different options * `Runner` * `run_dir` →`work_dir` (location of run directories, logs and temporary files) - reduce confusion with individual run directories * ... todo
the run configuration uses a different structure ```yaml run: runner: interface: worker: debug: will override "runner.debug" & "worker.debug" when set to "true" ``` To keep some backwards compatibility the `pre` and `post` subsections are also allowed. They are passed to the Worker and should be directly specified there: ```yaml run: pre: template post: numpytxt ``` is allowed but is better written as: ```yaml run: worker: class: command pre: template post: numpytxt ``` The `command` shorthand will be expanded to a `command`-worker ```yaml run: command: ./simulation.py ``` is expanded to: ```yaml run: worker: class: command command: ./simulation.py ``` Finally the following options are set from other sections of the config: * `runner.work_dir` ←`base_config.run_dir` * `interface.size` ← `base_config.ntrain` * `interface.input_config` ← `base_config.input` (generated by `variables`) * `interface.output_config` ← `base_config.output` (generated by `variables`) ---

Minor Changes

Tasks

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 3663821493

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
profit/al/active_learning.py 13 14 92.86%
profit/sur/encoders.py 32 33 96.97%
profit/util/file_handler.py 21 22 95.45%
profit/init.py 0 2 0.0%
profit/run/worker.py 54 56 96.43%
profit/sur/linreg/chaospy_linreg.py 22 24 91.67%
profit/util/component.py 26 28 92.86%
profit/util/util.py 7 10 70.0%
profit/sur/gp/backend/python_kernels.py 9 13 69.23%
profit/run/interface.py 49 54 90.74%
<!-- Total: 1221 1933 63.17% -->
Files with Coverage Reduction New Missed Lines %
profit/run/runner.py 1 86.96%
profit/run/slurm.py 1 15.38%
profit/init.py 2 77.78%
profit/run/worker.py 2 94.19%
profit/util/file_handler.py 2 93.88%
profit/al/simple_al.py 3 83.15%
profit/util/base_class.py 3 84.21%
profit/al/active_learning.py 4 91.53%
profit/sur/gp/backend/python_kernels.py 4 57.14%
profit/sur/gp/gaussian_process.py 4 94.2%
<!-- Total: 345 -->
Totals Coverage Status
Change from base Build 2707154646: 1.2%
Covered Lines: 2854
Relevant Lines: 4188

💛 - Coveralls