I have a scenario where a method is only ever used...
# hamilton-help
i
I have a scenario where a method is only ever used as a subdag, where each invocation uses a different upstream series as an input:
Copy code
def symbol_generator(symbols: Iterable[str]) -> Parallelizable[str]:
    """First stage of the per-symbol "task-group" pipeline."""
    yield from symbols
Hamilton complains that I don't provide
symbols
, which is understandable. An easy workaround is to provide some dummy input for that. However, I prefer a more "proper" solution. Is there a way to tell hamilton to not expect this as a standalone input? I briefly considered using
@resolve
, but that doesn't seem like the right direction.
✅ 1
s
@Iliya R can you sketch how you’re wiring that function in? I’m not sure I understand fully.
i
Ok, as soon as I have time....
I figured this one out... It was a mistake on my end where I used, in some downstream stage of subdag-collect a method that was part of the subdag (instead of a similarly-named method outside of it)
s
Cool. Sounds like an error we should be throwing though?
i
Sure, making the error more focused could really help!