Skip to content

Instantly share code, notes, and snippets.

@anna-geller
Created October 31, 2022 12:38
Show Gist options
  • Save anna-geller/18130e2121f31141834b8efcaad07211 to your computer and use it in GitHub Desktop.
Save anna-geller/18130e2121f31141834b8efcaad07211 to your computer and use it in GitHub Desktop.
from prefect import task, flow, get_run_logger
@task
def get_training_set():
return dict(data=21)
@task
def apply_ml_model(training_set):
result = training_set["data"] * 2
logger = get_run_logger()
logger.info("Final result: %s 🤖", result)
return result
@flow
def sales_forecast():
data = get_training_set()
apply_ml_model(data)
if __name__ == "__main__":
sales_forecast()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment