Skip to content

Instantly share code, notes, and snippets.

@hamelsmu
Last active February 2, 2022 06:02
Show Gist options
  • Save hamelsmu/d6af77e157d1626084a51af289d6cfc7 to your computer and use it in GitHub Desktop.
Save hamelsmu/d6af77e157d1626084a51af289d6cfc7 to your computer and use it in GitHub Desktop.
Four outerbounds blog post
from metaflow import step, current, FlowSpec, Parameter, card
from mymodel import train_model
class NBFlow(FlowSpec):
"A toy example of using the notebook card."
@step
def start(self):
# Train a model, save the results in `model_results`
self.model_results = train_model(...)
self.next(self.end)
@card(type='notebook')
@step
def end(self):
# eval_model.ipynb can read `self.model_results`
self.nb_options_dict = dict(input_path='eval_model.ipynb')
if __name__ == '__main__':
NBFlow()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment