Skip to content

Instantly share code, notes, and snippets.

@Viveckh
Last active January 22, 2020 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Viveckh/95a3348309b158adba062fa031b753a1 to your computer and use it in GitHub Desktop.
Save Viveckh/95a3348309b158adba062fa031b753a1 to your computer and use it in GitHub Desktop.
Example of a Metaflow Linear DAG
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