Last active
January 22, 2020 23:15
-
-
Save Viveckh/95a3348309b158adba062fa031b753a1 to your computer and use it in GitHub Desktop.
Example of a Metaflow Linear DAG
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 LinearFlow(FlowSpec): | |
""" | |
A flow to verify you can run a basic metaflow flow. | |
""" | |
# Global initializations here | |
@step | |
def start(self): | |
self.message = 'Thanks for reading.' | |
self.next(self.process_message) | |
@step | |
def process_message(self): | |
print('the message is: %s' % self.message) | |
self.next(self.end) | |
@step | |
def end(self): | |
print('the message is still: %s' % self.message) | |
if __name__ == '__main__': | |
LinearFlow() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment