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

continue-on-error in workflows, analogous to github actions #88

Open
PaulBFB opened this issue May 13, 2024 · 4 comments
Open

continue-on-error in workflows, analogous to github actions #88

PaulBFB opened this issue May 13, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@PaulBFB
Copy link

PaulBFB commented May 13, 2024

Hi guys 👋

Big fan of weasel and used it to build a prototype recently - annotation and learning layout of PDFs (using prodigy, you're probably familiar 😉 )

One thing that came up for me: there's a workflow in which I would like to annotate data with prodigy and then directly use the data in a with prodigy db-out and transform it and train a model. However, the preferred way to shut down prodigy seems to be user interrupt (according to this prodigy issue - how to quit prodigy )

So right now if a step in a weasel workflow has a non-zero exit status, the workflow doesn't continue and this is desired behavior if I understand correctly - however, in this case it would be really nice to tell weasel to continue the command on error like it's usually done in github actions, or better yet, ignore certain exit codes (like 130)

@honnibal
Copy link
Member

honnibal commented May 14, 2024

It perhaps feels a little ugly, but what I would do is write a wrapping bash script for the Prodigy command that doesn't have set -e. This script will exit with status 0, allowing the rest of the workflow to proceed.

If we want to allow continue-on-error in the definition, we'd want to be able to specify which steps should be allowed to error, and with which signals. If the script wrapping works suitably well, I'd be keen to avoid making the weasel definitions more complicated.

@PaulBFB
Copy link
Author

PaulBFB commented May 14, 2024

thanks a lot for the answer - I should have clarified, yes that's clearly a solution. but as you said, it feel a bit ugly.

As to your point about which steps may be ignored, or which exit status may be skipped, well I suppose that's what I would've preferred since I felt it fits well within the weasel steps definition - that's of course a matter of taste I guess...

@honnibal
Copy link
Member

I see your point, and you're right that I use exactly this in other workflow definition systems. So, we'll think about it :)

@PaulBFB
Copy link
Author

PaulBFB commented May 14, 2024

thanks, that's great! Appreciate it! Big fan of explosion, cheers

@svlandeg svlandeg added the enhancement New feature or request label May 14, 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

3 participants