https://prefect.io logo
Title
c

Chris Hart

04/02/2020, 7:02 PM
hai! I'm trying to use Parameters for the first time for a model training dag, and it seems to make each one into Tasks, is that normal or did I do something wrong? Code is:
with Flow("trainer", schedule=None) as flow:

        rand = Parameter("rand", default=params["rand"])
        limit = Parameter("limit", default=params["limit"])
        class_type = Parameter("class_type", default=params["class_type"])

        # tasks
        training_data = fetch_training_data(rand, limit, class_type)
        test_data = fetch_test_data(rand, limit, class_type)
        trained_model = train_model(training_data)
        test_model(trained_model, test_data)

    flow_state = flow.run(executor=DaskExecutor(), parameters=params)
s

Scott Zelenka

04/02/2020, 7:03 PM
It treats Parameters as Tasks, that's normal
:upvote: 1
in future releases, Parameters will have some form of validation on the data entered
c

Chris Hart

04/02/2020, 7:04 PM
awesome, just making sure I don't go down a purity rabbit hole!
thanks