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

Add option for overwriting/cloning over old experiments and better error messages #44

Open
cwhitlock-NOAA opened this issue Mar 1, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@cwhitlock-NOAA
Copy link
Collaborator

--overwrite option for checkoutSscript.py that allows for removing and re-checking-out over a preexisting experiment. Cleans up prior directories via cylc clean if needed, gives a warning message with a pause when overwriting experiments, and provides messages about the process.

@ceblanton
Copy link
Collaborator

This is great, thank you. There are two sorts of overwriting here, though.

There's the ~/cylc-src/NAME location, which is the workflow template checkout.

If that location exists, what does overwrite do? It seems a little destructive to do a "rm -rf" on the user's behalf. You could also consider renaming it instead to ~/cylc-src/NAME.old.blah, where blah might be some timestamp. (Bronx fremake renames the old directory as opposed to deleting it when --force-checkout is used).

Then there's the ~/cylc-run/NAME location, which is the installed workflow.

If that location exists, then yes, I think a cylc clean NAME on the users's behalf is what is needed.

@cwhitlock-NOAA
Copy link
Collaborator Author

cwhitlock-NOAA commented Mar 1, 2024 via email

@bcc2761
Copy link
Contributor

bcc2761 commented Mar 4, 2024

I second this proposal with two options. I think the erase/overwrite option should definitely be implemented, but I'm wondering if we give users the ability to simply just rename the old one (how --force-checkout in Bronx works right now), that users might use this command more than once and it would then have the same issue again where the pre-determined 'old experiment run' name would now have the 'already exists' error message. Do we want to allow them to move/rename multiple older experiment runs of the same name? This would be done with a counter of some sort, or else it would probably be better to not give them this option at all. Thoughts?

@ceblanton
Copy link
Collaborator

It's a little confusing to have the "workflow definition" configuration in ~/cylc-src/NAME and the "installed workflow" in ~/cylc-run/NAME, but we need to help make this as understandable as possible.

We could start with no extra options, but try to document the usages anyway. i.e.

If ~/cylc-src/NAME exists, the message could be:

"The workflow definition specified by -e/-p/-t already exists at the location ~/cylc-src/NAME. If you would like to recheck-out a fresh workflow definition, move or remove the ~/cylc-src/NAME location, and run this command again."

@cwhitlock-NOAA
Copy link
Collaborator Author

cwhitlock-NOAA commented Mar 4, 2024 via email

@cwhitlock-NOAA
Copy link
Collaborator Author

cwhitlock-NOAA commented Mar 4, 2024 via email

@bcc2761
Copy link
Contributor

bcc2761 commented Mar 4, 2024

How does Bronx deal with this right now? Does this ever happen? @ceblanton

@cwhitlock-NOAA
Copy link
Collaborator Author

As of March 8, chat with @ceblanton we seem to have the following consensus:

  • No auto-removal/auto-moving of experiments from the fre pp checkout; instead making a separate tool (fre pp stop) that stops all running processes associated with an experiment and cleans up any directories generated from ~/cylc-run.
  • Bronx currently deals with this in the fre run step, where you have the option to --overwrite or be --unique.
  • For now, we're trying to stop the process if there's an experiment that has the same name and ask the user to either change the configuration or run fre pp stop themselves. No effort to implement a move yet, and we're not trying to remove output files from the postprocessing since they'll be overwritten.

@ilaflott ilaflott added the enhancement New feature or request label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants