Skip to content
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

Sprint/workflow_manager #1041

Draft
wants to merge 84 commits into
base: release
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
80d3b6a
Added some temporary comments in workflow.py.
nwieters Sep 4, 2023
b63e9a9
Started to add docstrings to workflow.py
nwieters Sep 6, 2023
f9c0659
Added a docstring to esm_plugin_mamager
nwieters Sep 7, 2023
0c4a962
Some docstring changes in workflow.py
nwieters Sep 7, 2023
0452d3b
Started to improve the workflow documentation.
nwieters Sep 21, 2023
63e9cd5
Updating the workflow documentation.
nwieters Sep 27, 2023
14e4b65
Added a new general glossary.
nwieters Sep 27, 2023
f0bd385
Added comments to esm_plugin_manager
nwieters Oct 6, 2023
8c4b753
Start to refactor workflow.
nwieters Oct 6, 2023
a4a6b34
Update workflow documentation.
nwieters Oct 6, 2023
e329e14
Started to refactor workflow.py
nwieters Oct 6, 2023
d7f4565
Placed the default definition of workflow phases in esm_software.../d…
nwieters Oct 16, 2023
34456cb
Continued to improve documentationfor workflow manager.
nwieters Oct 17, 2023
b022c5d
Add language en in sphinxs conf.py
nwieters Oct 17, 2023
a2fc1a4
Update src/esm_plugin_manager/esm_plugin_manager.py
nwieters Oct 17, 2023
fef151d
Update src/esm_plugin_manager/esm_plugin_manager.py
nwieters Oct 17, 2023
c733a00
Update src/esm_runscripts/workflow.py
nwieters Oct 17, 2023
506c0a7
Correcte syntax of docstrings.
nwieters Oct 17, 2023
03b6e24
Renamed default_workflow_phases entry in defaults.yaml
nwieters Oct 17, 2023
b3b5fb1
Renamed workflow method, added property decorator and added test.
nwieters Oct 18, 2023
6260278
Added a temporary workflow to awicm3.
nwieters Oct 18, 2023
de0e598
Added method to return a list of an attribute for all phases.
nwieters Oct 20, 2023
11fa96b
Convert functions into methods, moved class variables to be instance …
nwieters Oct 23, 2023
b8d1db0
Further developments until order_cluster.
nwieters Oct 27, 2023
2cd0da6
Further changes for workflow manager.
nwieters Nov 3, 2023
98f4a7f
Merge branch 'release' into sprint/workflow_manager
nwieters Nov 9, 2023
273175f
Added prepend_newrun, skip_cluster, fixed next_submit entries.
nwieters Nov 10, 2023
3c72864
Reactivated function display_nicely.
nwieters Nov 13, 2023
47648ef
Added -i option to esm_runscripts usage
nwieters Nov 13, 2023
a0ae28a
Update documentation on how to inpect workflow.
nwieters Nov 14, 2023
547edb0
Added some flake8 style optimization.
nwieters Nov 14, 2023
6ab3f12
Update workflow examples.
nwieters Nov 16, 2023
43c40ca
Merge branch 'release' into sprint/workflow_manager_documentation
nwieters Nov 16, 2023
869cc0a
Adding another example for adding user phases to workflow.
nwieters Nov 16, 2023
465d8d3
Adapted the output for inspect (-i) workflow.
nwieters Nov 16, 2023
6aee395
Fix multiple phases in one cluster, fix batch_or_shell to be set by e…
nwieters Nov 16, 2023
138b3c2
Added some further comments and added cluster info in display_workflo…
nwieters Nov 17, 2023
92ea168
Added section defaults of new workflow phases.
nwieters Nov 17, 2023
fcf5a41
Add new workflow attribute in defaults.yaml.
nwieters Nov 17, 2023
5a3bfb8
Reactivated function complete_clusters.
nwieters Nov 17, 2023
e6bada5
Some changes for processing phases in awicm3.
nwieters Nov 17, 2023
ccafa8b
Update src/esm_runscripts/inspect.py
nwieters Nov 20, 2023
e107d99
Merged default and user phase class, made phase a subclass of dict.
nwieters Nov 20, 2023
ba204e6
Fixed some of the workflow tests.
nwieters Nov 20, 2023
6174fa3
Added review suggestions.
nwieters Nov 20, 2023
93b49b5
Changed initialization of workflow and phases.
nwieters Nov 22, 2023
afab16f
Changed initial config of default workflow phases.
nwieters Nov 22, 2023
ad0e620
Bugfix in error message.
nwieters Nov 22, 2023
91f1af6
Make next_run_triggered_by a keyword of phase (trigger_next_run) not …
nwieters Nov 22, 2023
aed2376
Bugfix if no phase trigger_next_run.
nwieters Nov 22, 2023
40c9190
Resolved function complete_cluster into other functions, fix next_sub…
nwieters Nov 23, 2023
1a8d121
Removed obsolete functions.
nwieters Nov 23, 2023
916a345
(Re)moved redundant code, renamed function for collecting phases.
nwieters Nov 24, 2023
c264f1a
Removed the possibility to set workflow keywords by user.
nwieters Nov 24, 2023
7395a9b
Changed next_run_triggered_by into phase keyworkd.
nwieters Nov 24, 2023
cf9d0e3
Worked on workflow tests, and other minor changes to workflow.
nwieters Nov 27, 2023
f86202d
Fixed a bug in order_phases_and_clusters
nwieters Nov 28, 2023
59590ed
Added workflow tests for test examples (in documentation).
nwieters Nov 28, 2023
ff7145b
Fixed test example_2, add preprocessing phase with adding newrun.
nwieters Nov 29, 2023
c784380
Added test for workflow example 5.
nwieters Nov 29, 2023
6aa7684
Added function to cluster phases after collecting them.
nwieters Nov 30, 2023
58e3729
Changes to pass all example tests.
nwieters Dec 1, 2023
ecf6bbb
Code optimizations
nwieters Dec 1, 2023
97d5d28
Removed unused function.
nwieters Dec 4, 2023
04d8ff0
Finished workflow tests.
nwieters Dec 4, 2023
16187d9
Changes in default workflow definition.
nwieters Dec 4, 2023
f26a115
Revive init_workflow funtion.
nwieters Dec 4, 2023
08d6976
Added my email to setup.py
nwieters Dec 4, 2023
7e1dd6b
Added comments and docstrings.
nwieters Dec 4, 2023
f57214d
Merge branch 'release' into sprint/workflow_manager
nwieters Dec 4, 2023
d1f5a21
Some more code improvements.
nwieters Dec 7, 2023
21fec58
Small changes in some comments.
nwieters Dec 8, 2023
67d08f8
Remove calc of nproc in workflow.py.
nwieters Dec 12, 2023
582caa1
Remove keyword run_on_queue (not used) and give error by missing run_…
nwieters Dec 12, 2023
698a523
Adapted log-file name and append mode.
nwieters Dec 13, 2023
bc6c082
Removed run_on_queue from default phases.
nwieters Dec 13, 2023
05a03ab
Removed run_on_queue.
nwieters Dec 13, 2023
8f75e6f
Added START and END statement to logfile of recipe steps.
nwieters Dec 13, 2023
4bfff6a
Added comments.
nwieters Dec 13, 2023
18fd44a
Added comments.
nwieters Dec 14, 2023
cdd7c20
Change comment
nwieters Dec 14, 2023
638a1ea
Adde jobid to logfiles.
nwieters Dec 14, 2023
ff0724c
Comment out unused functions.
nwieters Dec 15, 2023
e49eac8
Merge pull request #1171 from esm-tools/sprint/workflow_manager_docum…
nwieters Apr 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions configs/esm_software/esm_runscripts/defaults.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

per_model_defaults:
file_movements:
default:
all_directions: copy
bin:
init_to_exp: copy
exp_to_run: copy
run_to_work: copy
work_to_run: copy

file_movements:
default:
all_directions: copy
bin:
init_to_exp: copy
exp_to_run: copy
run_to_work: copy
work_to_run: copy
default_workflow_phases:
phases:
nwieters marked this conversation as resolved.
Show resolved Hide resolved
- prepcompute
- compute
- tidy
always_run_with:
- prepare
- prepexp
4 changes: 2 additions & 2 deletions configs/esm_software/esm_runscripts/esm_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ core:
- "initialize_experiment_logfile"
- "copy_tools_to_thisrun"
- "_copy_preliminary_files_from_experiment_to_thisrun"



prepcompute:
Expand Down Expand Up @@ -52,7 +52,7 @@ core:
- "throw_away_some_infiles"


observe:
observe:
- "init_monitor_file"
#- "get_last_jobid"
- "wait_and_observe"
Expand Down
22 changes: 19 additions & 3 deletions src/esm_runscripts/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,26 @@ def assemble_workflow(config):
"""

# 1. Generate default workflow object
#TODO: preset of default workflow phases should be set in some config file.
workflow = Workflow(["prepcompute","compute","tidy"],always_run_with=["prepare","prepexp"])
# initialize the default workflow as Workflow object
# TODO: NW where are these default phases defined???
# TODO: NW where are these default phases defined? For now I placed it in
# esm_tools/configs/esm_software/esm_runscripts/defaults.yaml
phases = []
always_run_with = []
if "defaults.yaml" in config["general"]:
if "default_workflow_phases" in config["general"]["defaults.yaml"]:
phases = config["general"]["defaults.yaml"]["default_workflow_phases"]["phases"]
if "always_run_with" in config["general"]["defaults.yaml"]["default_workflow_phases"]:
always_run_with = config["general"]["defaults.yaml"]["default_workflow_phases"]["always_run_with"]

if phases and always_run_with:
workflow = Workflow(phases, always_run_with=always_run_with)
elif phases:
workflow = Workflow(phases)
else:
esm_parser.user_error("ERROR", "No default workflow phases defined.")
# Note: NW Should this work also if no default phases are set in such a config file, but
# instead all workflow phases are defined in different configs and/or runscripts?
# TODO: NW Where could a user define a different (default) phase list? Or should this be changed in defaults.yaml?
# 2. Initialize default workflow phases
workflow = init_default_workflow(workflow, config)
# 3. Read in workflows from runscript and config files
Expand Down
Loading