Created
March 29, 2021 20:10
-
-
Save rapuckett/b5355828695d1f7711400ddd837c5ede to your computer and use it in GitHub Desktop.
MetaFlow Example 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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