Last active
June 26, 2024 20:53
-
-
Save elijahbenizzy/c566c82cca6792ed15e4c8686c64d0c4 to your computer and use it in GitHub Desktop.
This file contains 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 hamilton import driver, base | |
from hamilton.io.materialization import to | |
json_saver = to.json( | |
id="saved_json_object", # name given to the saver | |
dependencies=["a", "b", "c"], # node returning the model | |
combine=base.DictResult() # put a, b, c together as a dict | |
) | |
dr = ( | |
driver.Builder() | |
.with_modules(my_module) | |
.with_materializers(json_saver) | |
.build() | |
) | |
dr.execute(["saved_json_object"], inputs={"external_input" : 10}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment