Skip to content

Instantly share code, notes, and snippets.

@elijahbenizzy
Last active June 26, 2024 20:14
Show Gist options
  • Save elijahbenizzy/07c6442632249eb63d2e3509e07db0c4 to your computer and use it in GitHub Desktop.
Save elijahbenizzy/07c6442632249eb63d2e3509e07db0c4 to your computer and use it in GitHub Desktop.
from hamilton import driver
from hamilton.io.materialization import to
model_saver = to.mlflow(
id="trained_model_mlflow", # name given to the saver
dependencies=["trained_model"], # node returning the model
register_as="my_predictor", # name of the model in the MLFlow registry
)
dr = (
driver.Builder()
.with_modules(model_training)
.with_materializers(model_saver)
.build()
)
dr.execute(["trained_model_mlflow"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment