Last active
February 2, 2022 06:02
-
-
Save hamelsmu/d6af77e157d1626084a51af289d6cfc7 to your computer and use it in GitHub Desktop.
Four outerbounds blog post
This file contains hidden or 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 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