-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
- Join code expects to get module object from the groupby that looks like below
chronon/api/py/ai/chronon/join.py
Lines 65 to 67 in a3983fb
for ref in gc.get_referrers(group_by): if "__name__" in ref and ref["__name__"].startswith("group_bys"): group_by_module_name = ref["__name__"]
{'__name__': 'chronon_features.joins.quickstart.training_set',
'__doc__': None,
'__package__': 'chronon_features.joins.quickstart',
'__loader__': <ddtrace.internal.module._ImportHookChainedLoader object at 0x110e7aed0>, '__spec__': ModuleSpec(name='chronon_features.joins.quickstart.training_set'
...
}
- One potential problem, when referrer of the group_by isn't a dict or iterable, (In my case
JoinPart
object itself is the referrer, this check would fail
TypeError: argument of type 'JoinPart' is not iterable
- Second potential problem, the check of name starting "group_bys" assumes that we have group_by as top-level. In my case, i have a separate python project
chronon_features
, so it would expect module name aschronon_features.group_bys
Metadata
Metadata
Assignees
Labels
No labels