Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Created July 14, 2024 23:40
Show Gist options
  • Save elijahbenizzy/b2564226e14fdac1d7a9fef129d42525 to your computer and use it in GitHub Desktop.
Save elijahbenizzy/b2564226e14fdac1d7a9fef129d42525 to your computer and use it in GitHub Desktop.
from hamilton import driver, base
from hamilton import log_setup
dr = (
driver
.Builder()
.with_modules(base_dates, probabilities)
.with_adapters(base.PandasDataFrameResult())
.build()
)
delivery_probabilities = dr.execute(
["possible_dates", "probability_before_date", "probability_on_date"],
inputs={"start_date" : PREGNANCY_START_DATE, "current_date": datetime.datetime.now()}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment