We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I want to add more detailed error describe in stderr if a step faild , but when i use logger.error print ,running.stderr dosen't print my error log
if __name__=="__main__": with Runner('first_flow.py', show_output=True, pylint=False).run() as running: print(running.stderr)
here is my simple workflow
from logging import getLogger from metaflow import FlowSpec, step, current logger = getLogger(__name__) class HelloFlow(FlowSpec): def __init__(self, use_cli=True): super().__init__(use_cli) self.doc = None @step def start(self): self.next(self.hello) @step def hello(self): logger.error(f"HelloFlow failed to hello, {current.run_id}") raise ValueError("error again") self.next(self.end) @step def end(self): pass
The text was updated successfully, but these errors were encountered:
you might need to configure logger to emit to stderr
handler = logging.StreamHandler(sys.stderr) logger.addHandler(handler)
Sorry, something went wrong.
sorry , it nor work. When i fix code as you shown, stderr still can't catch error message
And ,another question if you konw, if workflow failed ,how can i exactly get the step that failed
No branches or pull requests
I want to add more detailed error describe in stderr if a step faild , but when i use logger.error print ,running.stderr dosen't print my error log
here is my simple workflow
The text was updated successfully, but these errors were encountered: