NOAA-GFDL / fre-cli

Python-based command line interface for FRE (FMS Runtime Environment) to compile and run FMS-based models and post-process their output.
GNU Lesser General Public License v3.0
3 stars 11 forks source link

Wrapper logic for production jobs #171

Open cwhitlock-NOAA opened 2 months ago

cwhitlock-NOAA commented 2 months ago

The thing-currently-named-wrapper (wrapper.py) works for testing fre-cli, when we have all history files already available at the time of running. However, when we get to running production jobs, the models will be sending over bundles of history files and post-processing them in parallel. This breaks some of the logic currently in the wrapper flow - in particular, the assumptions that there's not already a pre-existing experiment belonging to the same user that the current set of history files is being added to, and the assumption that there's not already an experiment with that name running.

For the production jobs, we need the logic outlined in the README for the fre pp tools (see end of this issue). This involves new logic (and tests of the new logic) in several tools: fre pp checkout, fre pp validate, fre pp run and fre pp status.

fre pp checkout:

fre pp validate:

fre pp run:

fre pp status:

Chris and I have discussed adding the decision logic to the wrapper script itself versus the individual tools that it calls; we came down on the side of the logic being useful at a tool level as well as the wrapper level and thus a good addition to the tools themselves.

image

Please note: this logic is only strictly necessary for production jobs. For our tests, where we can assume that all the history files are already present, this is not needed - and the existing wrapper script works fine, according to the two people who have used it.

cwhitlock-NOAA commented 1 month ago

Closing issue to divide into 4 smaller issues - see the wrapper logic: $tool issues for more

ceblanton commented 1 week ago

agree this for 2025.01