Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MetaFlow Example 1
from metaflow import FlowSpec, step
class TestFlow(FlowSpec):
@step
def start(self):
print('Hello World')
self.next(self.end)
@step
def end(self):
print('Goodbye World')
if __name__ == '__main__':
print('Starting main')
TestFlow()
print('Completed main')
2021-03-29 13:07:18.733 Workflow starting (run-id 1617048438719594):
2021-03-29 13:07:18.740 [1617048438719594/start/1 (pid 8700)] Task is starting.
2021-03-29 13:07:19.063 [1617048438719594/start/1 (pid 8700)] Starting main
2021-03-29 13:07:19.108 [1617048438719594/start/1 (pid 8700)] Hello World
2021-03-29 13:07:19.160 [1617048438719594/start/1 (pid 8700)] Task finished successfully.
2021-03-29 13:07:19.165 [1617048438719594/end/2 (pid 8704)] Task is starting.
2021-03-29 13:07:19.478 [1617048438719594/end/2 (pid 8704)] Starting main
2021-03-29 13:07:19.524 [1617048438719594/end/2 (pid 8704)] Goodbye World
2021-03-29 13:07:19.576 [1617048438719594/end/2 (pid 8704)] Task finished successfully.
2021-03-29 13:07:19.576 Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment