As per the issue title. This throws an error:
from hamilton.function_modifiers import inject, source, parameterize
@inject(params=source('my_func__params'))
@parameterize(
my_func_a={'date_range': source('my_func_a_date_range')},
my_func_b={'date_range': source('my_func_b_date_range')}
)
def my_func(date_range: tuple[pd.Timestamp, pd.Timestamp], params: int) -> int:
return 1
temp_module = ad_hoc_utils.create_temporary_module(
my_func, module_name="my_module"
)
config = {
'my_func__params': 1,
'my_func_a__date_range': [pd.Timestamp('2022-01-01'), pd.Timestamp('2022-01-10')],
'my_func_b__date_range': [pd.Timestamp('2023-01-01'), pd.Timestamp('2023-01-10')],
}
dr = driver.Driver(config, temp_module)
df = dr.execute(final_vars=['my_func_a'])
As per the issue title. This throws an error:
Library & System Information
Hamilton: 1.22.5 , Python 3.11.1