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
bug fix: unused arg for batch step --help #1817
bug fix: unused arg for batch step --help #1817
Conversation
If you want to keep the functionality, the proper line should read something like:
I was under the impression that ubf may be used by parallel so may be worth keeping around. However, no issues either way so feel free to merge when you are happy with it. |
Testing[735] @ 4e64862 |
Testing[735] @ 4e64862 had 6 FAILUREs. |
@romain-intel i can revert to if you want 244ff31
fwiw, the (edit: i don't have permission to merge) |
Finally had time to test this, and as Romain mentioned, Here's a simple test flow for the issue: from metaflow import step, FlowSpec, parallel
class UBFTest(FlowSpec):
@step
def start(self):
print("Starting 👋")
self.next(self.process, num_parallel=4)
@parallel
@step
def process(self):
print(f"processing input: {self.input}")
self.next(self.join)
@step
def join(self, inputs):
self.next(self.end)
@step
def end(self):
print("Done! 🏁")
if __name__ == "__main__":
UBFTest() |
# TODO: Maybe remove it altogether since it's not used here | ||
@click.option("--ubf-context", default=None, type=click.Choice([None, "ubf_control"])) |
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.
removing this completely leads to @parallel
breaking on batch. Keep the original fix instead and change comment to
# NOTE: ubf-context is not explicitly used, but @parallel decorator tries to pass this so keep it for now.
4e64862
to
a6d5c63
Compare
# TODO: Maybe remove it altogether since it's not used here | ||
@click.option("--ubf-context", default=None, type=click.Choice([None, "ubf_control"])) | ||
# NOTE: ubf-context is not explicitly used, but @parallel decorator tries to pass this so keep it for now | ||
@click.option("--ubf-context", default=None, type=click.Choice(["none", "ubf_control"])) |
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.
I would still recommend: type=click.Choice(["none", UBF_CONTROL, UBF_TASK]),
addresses: #1771
issue:
python hello.py batch step --help
command was breaking due to wrong type for click.Choice arg.change:
setting default arg for
ubf-context
from None to "none" in "batch step" make it compatible with click.Choice()however, ubf-context is not needed for the "step" function when using aws-batch, so we can safely remove altogether.