Slackbot
04/03/2023, 9:37 PMElijah Ben Izzy
04/03/2023, 9:41 PMBen
04/03/2023, 9:42 PMBen
04/03/2023, 9:43 PMElijah Ben Izzy
04/03/2023, 9:51 PMfrom another_module_with_reusable_logic_but_not_functions import load_data
@parameterize(
dataset_1={"path" : source("dataset_1_path")},
dataset_2=...)
def dataset(path: str) -> pd.DataFrame:
load_data(path)
2. Use ad_hoc_utils
from hamilton.ad_hoc_utils import create_temporary_module
what_do_i_do_with_this = parameterize(**{"new_func_name": source(arg1etc)})(my_func)
dr = driver.Driver(config, create_temporary_module(what_do_i_do_with_this, another_func, ...)
3. Actually, what you’re doing will (likely, haven’t tested it out yet), just work. That said, its a bit of an implementation detail as to how, but its pretty ironed out by now. Why? All these decorators do is add some markers to the function. As long as they’re marked prior to the driver constructing the graph, you should be good.Elijah Ben Izzy
04/03/2023, 9:55 PMBen
04/03/2023, 10:07 PMElijah Ben Izzy
04/03/2023, 10:37 PM