-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor run system API #173
Conversation
Component base class & replace config with arguments for Runner Worker, Pre-, Postprocessor & Interface rename Interface to RunnerInterface Worker follows the same scheme now - abstract base class default Worker is the CommandWorker with Pre- & Postprocessor - other Workers no longer require them format with black ToDo: config structure, read arguments from config, pass config to Worker
add test_interface_resize refactor using fixtures parametrize
fix redmod-team#165 by moving pytest config from setup.cfg to pyproject.toml add dev dependencies remove pytest alias
test all Postprocessors test the TemplatePreprocessor fix redmod-team#154: make TemplatePreprocessor methods to classmethods where possible this allows someone to create a subclass of the Template Preprocessor and override just some methods Component.wrap (Pre-, Postprocessor & Worker) now uses functools.wraps sets various metadata, e.g. the function name
* test CommandWorker * with MockWorkerInterface, MockPreprocessor and MockPostprocessor * set ZeroMQ Interface as default * a subclass of a Component without an explicit label is no longer registered only new Components get autogenerated labels if none are supplied
ToDo: test SlurmRunner ToDo: integration tests
integrate with config update integration tests change github workflow to use the *dev* requirements
- @classmethod & @Property - union of dictionaries - positional only arguments only needed in __init_subclass__ -> no actual change
Pull Request Test Coverage Report for Build 3663821493Warning: 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
💛 - Coveralls |
searchtype `grid` is the current default behaviour of creating a searchspace using a meshgrid over all input variables -> `nsearch^ndim` points. This gets too expensive with a moderate number of input dimensions. searchtype `halton` is a new option which distributes a fixed number `nsearch` of samples pseudo-randomly within the searchspace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small changes follow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved before Black
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 directoriesthe run configuration uses a different structure
To keep some backwards compatibility the
pre
andpost
subsections are also allowed. They are passed to the Worker and should be directly specified there:is allowed but is better written as:
The
command
shorthand will be expanded to acommand
-workeris expanded to:
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 byvariables
)interface.output_config
←base_config.output
(generated byvariables
)Minor Changes
searchtype
option forsimple
Active Learning - workaround for Active Learning: search space becomes too large #175Tasks
CommandWorker
which requires a Pre- and PostprocessorComponent
abstract base class for all run componentsinit
are the same as the config optionsConfig
classesslurm.py
: 71% (37/129)searchtype: halton
for Active Learning to allow more dimensionsblack
Ideas
main
into different functions, or better yet: create aStudy
class